From alekseev at rambler.ru Fri Feb 1 05:34:08 2019 From: alekseev at rambler.ru (Andrey) Date: Fri, 1 Feb 2019 03:34:08 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer image quality problem In-Reply-To: References: <1548910454890-0.post@n5.nabble.com> Message-ID: <1549017248513-0.post@n5.nabble.com> Hi! I converted dicom image to 512x512 and in this case I have no artifacts on projections. I uploaded images stack here for example: https://www.dropbox.com/s/f5nok0syka9g1er/battery_result_uint16_512x512_tags.zip?dl=0 And images 256?256 have no artifacts too. So probably only than the image size is power of 2 it works without artifacts. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From harry.glickman at mail.mcgill.ca Fri Feb 1 15:14:12 2019 From: harry.glickman at mail.mcgill.ca (HarryG) Date: Fri, 1 Feb 2019 13:14:12 -0700 (MST) Subject: [vtkusers] VTK Contouring, combining perpendicular polygons Message-ID: <1549052052462-0.post@n5.nabble.com> Hi all, I?m new to VTK, am trying to add contouring tools to an in-house radiation oncology treatment planning system. I have been successful in adding the ability to contour on axial slices (z planes), turning my drawn polygons into masks with vtkLinearExtrusionFilter and then vtkPolyDataToImageStencil, but can't figure out how contours from perpendicular axes should be combined. The user should be able to contour on all three planes simultaneously with any drawn polygon being immediately incorporated into the overall structure. I can create polygons like on the axial plane, but can?t figure out how these perpendicular polygons should be integrated. My thinking is that I need to get a list of all voxels within the polygons on these perpendicular planes, and then add all the voxels from all the planes and recreate a contour from this list ? is that even a correct assumption? There seem to be quite a few posts dealing with the concept of creating 3D surfaces from 2D contours, but none that I could find on combining contours from multiple planes. Is there something obvious I am missing? Thank you, Harry -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Sun Feb 3 19:06:34 2019 From: doug at beachmailing.com (scotsman60) Date: Sun, 3 Feb 2019 17:06:34 -0700 (MST) Subject: [vtkusers] Set ConnectivityRegion ID as Cell Scalar Data in vtkUnstructuredGrid Message-ID: <1549238794124-0.post@n5.nabble.com> Hello!! I'm using vtkConnetivityFilter to extract connected regions from a vtkUnstructuredGrid. Now I want to add a cell Scalar array on the vtkUnstructuredGrid where I set the RegionId on every Cell. But I can't seem to find a way of getting the regionID for every Cell out of the vtkConnetivityFilter. In fact I can't seem to find a way of even getting the Cells per region out of this filter. Any information about how to do this will be gratefully received. Thanks, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Mon Feb 4 01:37:34 2019 From: doug at beachmailing.com (scotsman60) Date: Sun, 3 Feb 2019 23:37:34 -0700 (MST) Subject: [vtkusers] How to draw "Spider" shapes in vtkUnstructuredgrid Message-ID: <1549262254426-0.post@n5.nabble.com> Hello!!!I'm trying to drawn what I call a "Spider" type shape in a vtkUnstructuredGrid."What's a Spider type shape" you might ask?It's a shape that has one reference point, attached via edges to multiple other points.Imagine a + sign - the reference point is a the center and the four other points are each of the tips.I can draw this type of shape using a vtkPolyLine as followsorigin = [0.0, 0.0, 0.0]p0 = [1.0, 0.0, 0.0]p1 = [-1.0, 0.0, 0.0]p2 = [0.0, 1.0, 0.0]p3 = [0.0, -1.0, 0.0]points = vtk.vtkPoints()points.InsertNextPoint(origin)points.InsertNextPoint(p0)points.InsertNextPoint(p1)points.InsertNextPoint(p2)points.InsertNextPoint(p3)mesh = vtk.vtkUnstructuredGrid()mesh.SetPoints(points)polyLine = vtk.vtkPolyLine()polyLine.GetPointIds().SetNumberOfIds(8)polyLine.GetPointIds().SetId(0, 0)polyLine.GetPointIds().SetId(1, 1)polyLine.GetPointIds().SetId(2, 0)polyLine.GetPointIds().SetId(3, 2)polyLine.GetPointIds().SetId(4, 0)polyLine.GetPointIds().SetId(5, 3)polyLine.GetPointIds().SetId(6, 0)polyLine.GetPointIds().SetId(7, 4)But I have to draw 100,000+ of these shapes and this approach seems wasteful - 7 edges in the polyline when only four are required.Any ideas for a more efficient approach will be gratefully received,Thanks,Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From anka at bic.mni.mcgill.ca Mon Feb 4 12:50:19 2019 From: anka at bic.mni.mcgill.ca (Anka Kochanowska) Date: Mon, 4 Feb 2019 12:50:19 -0500 Subject: [vtkusers] vtkTransform::Identity() where it gets wrong? In-Reply-To: References: Message-ID: Hi! I still see the same code in vtk 8, your patch has not been applied. I am trying to follow ypur advice. Anka On Tue, Sep 18, 2018 at 12:12 PM David Gobbi wrote: > Thanks for the report. That vtkTransform code was actually written before > ModifiedEvent even existed. > > I've submitted a patch: > https://gitlab.kitware.com/vtk/vtk/merge_requests/4680 > > Be careful with how you use ModifiedEvent. The events in vtkCommand.h are > handled synchronously, so if you have a callback bound to the ModifiedEvent > for an object, then any code that modifies that object has to sit and wait > until your callback finished running. > > The Modified() method was initially designed to do only one thing: change > the object's timestamp. VTK was designed from the ground up to be a pull > pipeline: the pipeline is meant to be driven by either user interaction > (mouse, keyboard, I/O) or by timer events (e.g. for animation); the > pipeline checks timestamps to see what has changed since the last time it > executed. Driving actions from ModifiedEvent goes against this and will > lead to less efficient code, and can cause instability depending on how > your ModifiedEvent callback changes the pipeline state. > > I recommend using ModifiedEvent only for logging, debugging, or simple > bookkeeping. I'll stop ranting now :) > > Thanks again for the bug report, > > - David > > > On Tue, Sep 18, 2018 at 9:12 AM Anka Kochanowska > wrote: > >> void vtkTransform::Identity() >> >> { >> >> this->Concatenation->Identity(); >> >> this->Modified(); >> >> >> // support for the legacy hack in InternalUpdate >> >> if (this->Matrix->GetMTime() > this->MatrixUpdateMTime) >> >> { >> >> this->Matrix->Identity(); >> >> } >> >> } >> >> Modified() is called before the matrix is reset to Identity. >> >> Should it be called at the end? >> >> >> My code reacts to Modified event and promptly uses matrix that was not yet changed. >> >> I patch it by calling transform->Modified() after transform->Identity(); >> >> >> Anka >> >> _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Feb 4 13:03:41 2019 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 4 Feb 2019 11:03:41 -0700 Subject: [vtkusers] vtkTransform::Identity() where it gets wrong? In-Reply-To: References: Message-ID: The change was merged into master on Sept 18, 2018 and is in the VTK 8.2 release. It is not in 8.0 or 8.1. David On Mon, Feb 4, 2019 at 10:50 AM Anka Kochanowska wrote: > Hi! > I still see the same code in vtk 8, your patch has not been applied. > I am trying to follow ypur advice. > Anka > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anka at bic.mni.mcgill.ca Mon Feb 4 13:08:53 2019 From: anka at bic.mni.mcgill.ca (Anka Kochanowska) Date: Mon, 4 Feb 2019 13:08:53 -0500 Subject: [vtkusers] vtkTransform::Identity() where it gets wrong? In-Reply-To: References: Message-ID: Sorry, I am using 8.1.2. Anka On Mon, Feb 4, 2019 at 1:03 PM David Gobbi wrote: > The change was merged into master on Sept 18, 2018 and is in the VTK 8.2 > release. It is not in 8.0 or 8.1. > > David > > On Mon, Feb 4, 2019 at 10:50 AM Anka Kochanowska > wrote: > >> Hi! >> I still see the same code in vtk 8, your patch has not been applied. >> I am trying to follow ypur advice. >> Anka >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 dave.demarle at kitware.com Mon Feb 4 17:23:02 2019 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 4 Feb 2019 17:23:02 -0500 Subject: [vtkusers] Set ConnectivityRegion ID as Cell Scalar Data in vtkUnstructuredGrid In-Reply-To: <1549238794124-0.post@n5.nabble.com> References: <1549238794124-0.post@n5.nabble.com> Message-ID: Hi Doug. Doesn't the cell aligned array named "RegionId" in the output grid from that filter already contain that information? David E DeMarle Kitware, Inc. Principal Engineer p.s. VTK discussions are starting to move to discourse.vtk.org please consider signing up there. On Sun, Feb 3, 2019 at 7:08 PM scotsman60 wrote: > Hello!! > > I'm using vtkConnetivityFilter to extract connected regions from a > vtkUnstructuredGrid. > > Now I want to add a cell Scalar array on the vtkUnstructuredGrid where I > set > the RegionId on every Cell. > > But I can't seem to find a way of getting the regionID for every Cell out > of > the vtkConnetivityFilter. In fact I can't seem to find a way of even > getting > the Cells per region out of this filter. > > Any information about how to do this will be gratefully received. > > Thanks, > > Doug > > > > -- > 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 sean at rogue-research.com Tue Feb 5 12:48:29 2019 From: sean at rogue-research.com (Sean McBride) Date: Tue, 5 Feb 2019 12:48:29 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: References: Message-ID: <20190205174829.597882514@mail.rogue-research.com> On Mon, 21 Jan 2019 10:22:40 -0500, Cory Quammen via vtk-developers said: >To set up Discourse in mailing list mode, please see: > >https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ And after doing so, where does one email to start a new thread? I poked around the web UI but did not find my answer in the FAQ or elsewhere. Cheers, Sean From david.thompson at kitware.com Tue Feb 5 13:01:35 2019 From: david.thompson at kitware.com (David Thompson) Date: Tue, 5 Feb 2019 13:01:35 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: <20190205174829.597882514@mail.rogue-research.com> References: <20190205174829.597882514@mail.rogue-research.com> Message-ID: <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> On 2/5/19 12:48 PM, Sean McBride wrote: > On Mon, 21 Jan 2019 10:22:40 -0500, Cory Quammen via vtk-developers said: > >> To set up Discourse in mailing list mode, please see: >> >> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ > > And after doing so, where does one email to start a new thread? I poked around the web UI but did not find my answer in the FAQ or elsewhere. This is an answer from Slicer's discourse forum: https://discourse.slicer.org/t/what-is-the-slicer-discourse-e-mail-address/1329 but I have not tried it and would guess the domain name should be vtk.org rather than discoursemail.com (assuming everything is configured to allow it). David From lasso at queensu.ca Tue Feb 5 13:07:40 2019 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 5 Feb 2019 18:07:40 +0000 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> References: <20190205174829.597882514@mail.rogue-research.com> <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> Message-ID: It should be feasible to create topics by email, but please use the web interface as much as possible. Maybe it takes 5-10s for you to open a web browser, but think about the precious seconds that you save for hundreds of readers by making your post better formatted, easier to read, posted in the right category with the right keywords. The web interface also gives live preview, checks for similar posts, allows you to @mention other users, etc. Andras -----Original Message----- From: vtk-developers On Behalf Of David Thompson via vtk-developers Sent: Tuesday, February 5, 2019 1:02 PM To: Sean McBride ; vtk-developers at vtk.org; vtkusers at vtk.org Subject: Re: [vtk-developers] VTK Discourse forum is now available On 2/5/19 12:48 PM, Sean McBride wrote: > On Mon, 21 Jan 2019 10:22:40 -0500, Cory Quammen via vtk-developers said: > >> To set up Discourse in mailing list mode, please see: >> >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdisc >> ourse.vtk.org%2Ft%2Fusing-discourse-as-a-mailing-list%2F&data=02% >> 7C01%7Classo%40queensu.ca%7C0b11329a3f6340b12abb08d68b93ec80%7Cd61ecb >> 3b38b142d582c4efb2838b925c%7C1%7C0%7C636849864782080933&sdata=zC0 >> 0%2FrUGDTCqp%2Bw8gKWhgWCEK7hQ6Dvf7WnSWAuu%2Fs0%3D&reserved=0 > > And after doing so, where does one email to start a new thread? I poked around the web UI but did not find my answer in the FAQ or elsewhere. This is an answer from Slicer's discourse forum: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdiscourse.slicer.org%2Ft%2Fwhat-is-the-slicer-discourse-e-mail-address%2F1329&data=02%7C01%7Classo%40queensu.ca%7C0b11329a3f6340b12abb08d68b93ec80%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636849864782080933&sdata=ONkatAQBE4x6XNqaYUXu7aBroqQw23My%2FVJVAr0BcaY%3D&reserved=0 but I have not tried it and would guess the domain name should be vtk.org rather than discoursemail.com (assuming everything is configured to allow it). David _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C0b11329a3f6340b12abb08d68b93ec80%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636849864782080933&sdata=sOlS6UcL08YHFSlZFJsC%2BxIJ6uH%2FrxV1k73UWrt5Ajo%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C0b11329a3f6340b12abb08d68b93ec80%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636849864782080933&sdata=4NOpuzxqcM9vARCYfWK11sVs6zuL%2BgnWOWjpQp6wVJY%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&data=02%7C01%7Classo%40queensu.ca%7C0b11329a3f6340b12abb08d68b93ec80%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636849864782090943&sdata=qPC4FhOyl8YXxuiggMShXmG01mN%2B0fR7T1AP%2FiYvgvM%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtk-developers&data=02%7C01%7Classo%40queensu.ca%7C0b11329a3f6340b12abb08d68b93ec80%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636849864782090943&sdata=GoVDkm43eIrv%2BzGUyS46ohDBtWp6MzgG3JDbYPUhlmM%3D&reserved=0 From cory.quammen at kitware.com Tue Feb 5 13:32:08 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Feb 2019 13:32:08 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: <20190205174829.597882514@mail.rogue-research.com> References: <20190205174829.597882514@mail.rogue-research.com> Message-ID: Sean, There is an email address to start a new topic in each category: vtk+announcements at discourse.vtk.org vtk+support at discourse.vtk.org vtk+web at discourse.vtk.org vtk+vrar at discourse.vtk.org vtk+development at discourse.vtk.org vtk+sitefeedback at discourse.vtk.org vtk+dashboards at discourse.vtk.org I just set this up, so let me know if you see any problems. Cory On Tue, Feb 5, 2019 at 12:48 PM Sean McBride wrote: > On Mon, 21 Jan 2019 10:22:40 -0500, Cory Quammen via vtk-developers said: > > >To set up Discourse in mailing list mode, please see: > > > >https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ > > And after doing so, where does one email to start a new thread? I poked > around the web UI but did not find my answer in the FAQ or elsewhere. > > Cheers, > > Sean > > > _______________________________________________ > 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 brad.king at kitware.com Tue Feb 5 13:37:14 2019 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Feb 2019 13:37:14 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: References: <20190205174829.597882514@mail.rogue-research.com> Message-ID: <014b3e34-6f13-a320-802a-47ed5eeceb5d@kitware.com> On 2/5/19 1:32 PM, Cory Quammen via vtkusers wrote: > There is an email address to start a new topic in each category: > I just set this up, so let me know if you see any problems. Thanks. Please list those in the bottom of https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ as we do for ParaView. Thanks, -Brad From cory.quammen at kitware.com Tue Feb 5 13:46:23 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Feb 2019 13:46:23 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: <014b3e34-6f13-a320-802a-47ed5eeceb5d@kitware.com> References: <20190205174829.597882514@mail.rogue-research.com> <014b3e34-6f13-a320-802a-47ed5eeceb5d@kitware.com> Message-ID: On Tue, Feb 5, 2019 at 1:37 PM Brad King wrote: > On 2/5/19 1:32 PM, Cory Quammen via vtkusers wrote: > > There is an email address to start a new topic in each category: > > I just set this up, so let me know if you see any problems. > > Thanks. Please list those in the bottom of > > https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ > > as we do for ParaView. > Done -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Feb 5 13:59:37 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Feb 2019 10:59:37 -0800 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> References: <20190205174829.597882514@mail.rogue-research.com> <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> Message-ID: So I have a couple of emails to vtk-developers. I guess they are not visible to anyone? I prefer email. I never use discourse. Bill On Tue, Feb 5, 2019 at 10:01 AM David Thompson via vtk-developers wrote: > > On 2/5/19 12:48 PM, Sean McBride wrote: > > On Mon, 21 Jan 2019 10:22:40 -0500, Cory Quammen via vtk-developers said: > > > >> To set up Discourse in mailing list mode, please see: > >> > >> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ > > > > And after doing so, where does one email to start a new thread? I poked around the web UI but did not find my answer in the FAQ or elsewhere. > > This is an answer from Slicer's discourse forum: > > https://discourse.slicer.org/t/what-is-the-slicer-discourse-e-mail-address/1329 > > but I have not tried it and would guess the domain name should be > vtk.org rather than discoursemail.com (assuming everything is configured > to allow it). > > David > _______________________________________________ > 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 > -- Unpaid intern in BillsParadise at noware dot com From david.thompson at kitware.com Tue Feb 5 16:06:31 2019 From: david.thompson at kitware.com (David Thompson) Date: Tue, 5 Feb 2019 16:06:31 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: References: <20190205174829.597882514@mail.rogue-research.com> <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> Message-ID: <12B492F7-33CE-4514-B168-3A12B0753C35@kitware.com> Hi Bill, > So I have a couple of emails to vtk-developers. I guess they are not > visible to anyone? For now, both discourse and the mailing list are active. The mailing list will eventually become inactive (but still archived). > I prefer email. I never use discourse. It is possible to use discourse in mailing-list mode: https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/53 which requires some initial setup -- just like the mailing list requires you to register your e-mail to opt in. I prefer flat text for most things, too, but not to the point where I use libaa[1] for all my rendering. :-) David [1]: http://aa-project.sourceforge.net/index.html http://aa-project.sourceforge.net/gallery/alfons.html From bill.lorensen at gmail.com Tue Feb 5 16:12:23 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Feb 2019 13:12:23 -0800 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: <12B492F7-33CE-4514-B168-3A12B0753C35@kitware.com> References: <20190205174829.597882514@mail.rogue-research.com> <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> <12B492F7-33CE-4514-B168-3A12B0753C35@kitware.com> Message-ID: I have email setup but if I start a topic using the mailing list, it does not show up in discourse. On Tue, Feb 5, 2019, 1:07 PM David Thompson Hi Bill, > > > So I have a couple of emails to vtk-developers. I guess they are not > > visible to anyone? > > For now, both discourse and the mailing list are active. The mailing list > will eventually become inactive (but still archived). > > > I prefer email. I never use discourse. > > It is possible to use discourse in mailing-list mode: > > https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/53 > > which requires some initial setup -- just like the mailing list requires > you to register your e-mail to opt in. > > I prefer flat text for most things, too, but not to the point where I use > libaa[1] for all my rendering. :-) > > David > > [1]: http://aa-project.sourceforge.net/index.html > http://aa-project.sourceforge.net/gallery/alfons.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From fjmunoz95 at gmail.com Wed Feb 6 10:51:16 2019 From: fjmunoz95 at gmail.com (frmunoz) Date: Wed, 6 Feb 2019 08:51:16 -0700 (MST) Subject: [vtkusers] contouring 3D polyData object not giving isosurface Message-ID: <1549468276089-0.post@n5.nabble.com> hi, I have problems when doing contours on a PolyData object, my input data comes from a .vtu files which have Unstructured Grid, so this is what i've done: - transform the UnstructuredGrid to PolyData - do pointsValues().SetScalars using one Attribute from the Unstructured Grid (i've checked that is a point data attribute) as vtkDoubleArray. - do contour using this poly data, choose the contours and update - then create the mapper, actor and rederer to visualize. and i get a contour line which correspond to the border of the isosurface (checked with paraview) but inside the contour line, where the surface should be, there is nothing. I'm using windows 10 and i've isntalled vtk using anaconda, cannot upload the file since is too big, but in code what im doing is: # read file reader = vtk.vtkXMLUnstructuredGridReader() reader.SetFileName(file_name) reader.Update() # transform to poly geo = vtk.vtkGeometryFilter() geo.SetInputConnection(reader.GetOutputPort()) geo.Update() poly = geo.GetOutput() # set desired scalar on poly data attr = poly.GetAttributes(0).GetArray(1) # desired attr poly.GetPointData().SetScalars(attr) # get contour poly data contour = vtk.vtkContourFilter() contour.SetInputData(poly) contour.SetValue(0, 0) contour.Update() # mapper mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(contour.GetOutput()) mapper.ScalarVisibilityOff() # actor actor = vtk.vtkActor() actor.SetMapper(mapper) # renderer renderer = vtk.vtkRenderer() render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(render_window) renderer.AddActor(actor) renderer.SetBackground(.3, .6, .3) # green render_window.SetSize(600, 600) render_window.Render() interactor.Initialize() interactor.Start() i'll insert an image of the result i'm seeing. P.D.1 if you wonder why im not just using the UnstructuredGrid to do the contour it's because didn't work, but really dont know what was the problem. Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Wed Feb 6 11:04:13 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Feb 2019 11:04:13 -0500 Subject: [vtkusers] contouring 3D polyData object not giving isosurface In-Reply-To: <1549468276089-0.post@n5.nabble.com> References: <1549468276089-0.post@n5.nabble.com> Message-ID: Hi, The vtkusers mailing list is transitioning to discourse.vtk.org. Please post new questions on that forum. To answer your question, you are seeing exactly what you should see with this pipeline. The contour on a surface will always be a set of line segments. If you want to see a surface corresponding the interior of the contour, you might consider using the vtkClipPolyData, which will clip the geometry by the active scalar array according to what you set in vtkClipPolyData::SetValue(). HTH, Cory On Wed, Feb 6, 2019 at 10:53 AM frmunoz wrote: > hi, > > I have problems when doing contours on a PolyData object, my input data > comes from a .vtu files which have Unstructured Grid, so this is what i've > done: > - transform the UnstructuredGrid to PolyData > - do pointsValues().SetScalars using one Attribute from the Unstructured > Grid (i've checked that is a point data attribute) as vtkDoubleArray. > - do contour using this poly data, choose the contours and update > - then create the mapper, actor and rederer to visualize. > > and i get a contour line which correspond to the border of the isosurface > (checked with paraview) but inside the contour line, where the surface > should be, there is nothing. > > I'm using windows 10 and i've isntalled vtk using anaconda, cannot upload > the file since is too big, but in code what im doing is: > > # read file > reader = vtk.vtkXMLUnstructuredGridReader() > reader.SetFileName(file_name) > reader.Update() > > # transform to poly > geo = vtk.vtkGeometryFilter() > geo.SetInputConnection(reader.GetOutputPort()) > geo.Update() > poly = geo.GetOutput() > > # set desired scalar on poly data > attr = poly.GetAttributes(0).GetArray(1) # desired attr > poly.GetPointData().SetScalars(attr) > > # get contour poly data > contour = vtk.vtkContourFilter() > contour.SetInputData(poly) > contour.SetValue(0, 0) > contour.Update() > > # mapper > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputData(contour.GetOutput()) > mapper.ScalarVisibilityOff() > > # actor > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > # renderer > renderer = vtk.vtkRenderer() > render_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetRenderWindow(render_window) > > renderer.AddActor(actor) > renderer.SetBackground(.3, .6, .3) # green > > render_window.SetSize(600, 600) > render_window.Render() > interactor.Initialize() > interactor.Start() > > i'll insert an image of the result i'm seeing. > > > > P.D.1 if you wonder why im not just using the UnstructuredGrid to do the > contour it's because didn't work, but really dont know what was the > problem. > > 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 sean at rogue-research.com Wed Feb 6 11:27:30 2019 From: sean at rogue-research.com (Sean McBride) Date: Wed, 6 Feb 2019 11:27:30 -0500 Subject: [vtkusers] [vtk-developers] VTK Discourse forum is now available In-Reply-To: References: <20190205174829.597882514@mail.rogue-research.com> <42096962-6a0e-9511-8cd7-f3bd8c34dc2e@kitware.com> <12B492F7-33CE-4514-B168-3A12B0753C35@kitware.com> Message-ID: <20190206162730.1216776556@mail.rogue-research.com> On Tue, 5 Feb 2019 13:12:23 -0800, Bill Lorensen said: >I have email setup but if I start a topic using the mailing list, it does >not show up in discourse. Bill, When they say 'discourse can be used in mailing list mode', they don't mean that the exist mailing lists interconnect with discourse. They are 2 separate and unrelated things. They are saying to stop using and and instead use: vtk+announcements at discourse.vtk.org vtk+support at discourse.vtk.org vtk+web at discourse.vtk.org vtk+vrar at discourse.vtk.org vtk+development at discourse.vtk.org vtk+sitefeedback at discourse.vtk.org vtk+dashboards at discourse.vtk.org Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From bill.lorensen at gmail.com Wed Feb 6 12:23:07 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 6 Feb 2019 09:23:07 -0800 Subject: [vtkusers] contouring 3D polyData object not giving isosurface In-Reply-To: <1549468276089-0.post@n5.nabble.com> References: <1549468276089-0.post@n5.nabble.com> Message-ID: Run contour on the unstructured grid. Geometry filter will just produce polydata on the external surface. Bill On Wed, Feb 6, 2019 at 7:53 AM frmunoz wrote: > > hi, > > I have problems when doing contours on a PolyData object, my input data > comes from a .vtu files which have Unstructured Grid, so this is what i've > done: > - transform the UnstructuredGrid to PolyData > - do pointsValues().SetScalars using one Attribute from the Unstructured > Grid (i've checked that is a point data attribute) as vtkDoubleArray. > - do contour using this poly data, choose the contours and update > - then create the mapper, actor and rederer to visualize. > > and i get a contour line which correspond to the border of the isosurface > (checked with paraview) but inside the contour line, where the surface > should be, there is nothing. > > I'm using windows 10 and i've isntalled vtk using anaconda, cannot upload > the file since is too big, but in code what im doing is: > > # read file > reader = vtk.vtkXMLUnstructuredGridReader() > reader.SetFileName(file_name) > reader.Update() > > # transform to poly > geo = vtk.vtkGeometryFilter() > geo.SetInputConnection(reader.GetOutputPort()) > geo.Update() > poly = geo.GetOutput() > > # set desired scalar on poly data > attr = poly.GetAttributes(0).GetArray(1) # desired attr > poly.GetPointData().SetScalars(attr) > > # get contour poly data > contour = vtk.vtkContourFilter() > contour.SetInputData(poly) > contour.SetValue(0, 0) > contour.Update() > > # mapper > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputData(contour.GetOutput()) > mapper.ScalarVisibilityOff() > > # actor > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > # renderer > renderer = vtk.vtkRenderer() > render_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetRenderWindow(render_window) > > renderer.AddActor(actor) > renderer.SetBackground(.3, .6, .3) # green > > render_window.SetSize(600, 600) > render_window.Render() > interactor.Initialize() > interactor.Start() > > i'll insert an image of the result i'm seeing. > > > > P.D.1 if you wonder why im not just using the UnstructuredGrid to do the > contour it's because didn't work, but really dont know what was the problem. > > 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 -- Unpaid intern in BillsParadise at noware dot com From bill.lorensen at gmail.com Thu Feb 7 01:17:02 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 6 Feb 2019 22:17:02 -0800 Subject: [vtkusers] ANN: VTKExamples Supports New VTK Module API Message-ID: We are pleased to announce that the VTKExamples Project now works with both the old and new vtk module API. The new VTK Module API is a complete replacement for the old API. The VTKExamples individual examples and CMakeLists files support both APIs. For example, see this example: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/TissueLens/#cmakeliststxt Also, the stand-alone build supports both APIs. Caveats: The VTKExamples now require cmake 3.3 or higher. The VTKExamples will no longer be available as a Remote Module. We hope to offer it as an External Project in the next month. Please visit the VTKExamples Project at: https://lorensen.github.io/VTKExamples/site/ and follow project update at: https://www.researchgate.net/project/VTK-Examples Bill and Andrew -- Unpaid intern in BillsParadise at noware dot com From mallikarjun49 at gmail.com Fri Feb 8 06:51:10 2019 From: mallikarjun49 at gmail.com (mallikarjun49) Date: Fri, 8 Feb 2019 04:51:10 -0700 (MST) Subject: [vtkusers] How to get each region as a polydata using vtkConnectedPointsFilter Message-ID: <1549626670665-0.post@n5.nabble.com> Hello All, I want to extract all the points which are connected by a certain radius as a polydata. I am trying to use vtkConnectedPointsFilter like this below: *auto region_groups = vtkSmartPointer::New(); region_groups->SetInputData(Input_polyData); region_groups->SetRadius(0.1); region_groups->SetExtractionModeToAllRegions(); region_groups->Update(); * int *no_of_regions* = region_groups->GetNumberOfExtractedRegions(); Now I want to extract each region out of *no_of_regions* as a separate polydata. Any help would be much appreciated! Thanks and Regards, Mallikarjun -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sweet.factory_92 at hotmail.com Fri Feb 8 11:14:57 2019 From: sweet.factory_92 at hotmail.com (Anna1994) Date: Fri, 8 Feb 2019 09:14:57 -0700 (MST) Subject: [vtkusers] Selecting the depth of point clouds Message-ID: <1549642497242-0.post@n5.nabble.com> I currently have a code where I can import a point cloud, select a specific area via pcl::visualization::AreaPickingEvent and crop that area out. So far I am selecting the area via VTK rubberband feature (triggered by x or X). However, instead of having a rectangular shape to select the points, I would like to have a cube that would select only the points inside the cube or maybe select the points using the rectangle rubberband and then press another button to select the depth. I am currently using QT, C++, VTK and PCL. Is there any VTK function that would do that? In Summary: What I have now: trigger x, drag a rectangle, crop the area (with the entire depth) What I want: drag a cube shape, select the area inside the cube, crop that area out OR select via rectangle rubberband then press another button to select the depth. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From trinian.gordon at outlook.com Fri Feb 8 15:24:53 2019 From: trinian.gordon at outlook.com (Trinian Gordon) Date: Fri, 8 Feb 2019 20:24:53 +0000 Subject: [vtkusers] Examples don't Configure with New Module Structure Message-ID: I'm trying to build the TissueLens example, along with other examples, and all the examples that I have tried now fail in cmake with the error message: Could not find the VTK package with the following required components: CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, FiltersSources, IOImage, InteractionStyle, RenderingContextOpenGL2, RenderingCore, RenderingFreeType, RenderingOpenGL2. I am building against a master source build of VTK, and have noticed that the /lib/cmake/vtk-#/Modules folder is no longer created with a vtk build & install. CMake 3.10 vs 3.13.4 makes no difference. All of these modules are built and exist in the /lib and /bin folders, but cmake doesn't find them. Any ideas? -Trinian -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Feb 8 15:26:57 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 8 Feb 2019 15:26:57 -0500 Subject: [vtkusers] Top VTK Discourse topics for the past week Message-ID: If you haven't registered for VTK's Discourse forum yet, here's what you've been missing this week. A VTK python module for analysis and simulation vtkLogging static cast error Reverse thread history VTK.js Courses? Python VTK ? Can we get the mesh rendered from the colorized point cloud Bug with depth peeling and offscreen rendering to an image How to disable vtkOutputWindow? ALL_BUILD Access Denied VTK 8.90 and modules.json Dicom and three planes Did VTK_CUSTOM_LIBRARY_SUFFIX build option go away? Show the cage axes GCC 8.2 Warning in Testing VTKExamples Supports New VTK Module API rendering slows down Seg Fault vtkXMLMultiBlockDataSetWriter with vtkPolyData -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Feb 8 15:39:33 2019 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 8 Feb 2019 15:39:33 -0500 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: Message-ID: <20190208203933.GD28631@rotor> On Fri, Feb 08, 2019 at 20:24:53 +0000, Trinian Gordon wrote: > I'm trying to build the TissueLens example, along with other examples, > and all the examples that I have tried now fail in cmake with the > error message: Where does this example live? WikiExamples? Somewhere else? > Could not find the VTK package with the following required components: > CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, > FiltersSources, IOImage, InteractionStyle, RenderingContextOpenGL2, > RenderingCore, RenderingFreeType, RenderingOpenGL2. > > I am building against a master source build of VTK, and have noticed > that the /lib/cmake/vtk-#/Modules folder is no longer created with a > vtk build & install. CMake 3.10 vs 3.13.4 makes no difference. There's nothing to put in that directory. Modules are now just plain CMake targets with their usage requirements attached to them. > All of these modules are built and exist in the /lib and /bin folders, > but cmake doesn't find them. Any ideas? What CMake code are you using to find VTK? --Ben From trinian.gordon at outlook.com Fri Feb 8 16:06:32 2019 From: trinian.gordon at outlook.com (Trinian Gordon) Date: Fri, 8 Feb 2019 21:06:32 +0000 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: <20190208203933.GD28631@rotor> References: , <20190208203933.GD28631@rotor> Message-ID: It's from: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/TissueLens/ I'm downloading these examples, uncompressing to a folder, entering that folder (which contains the CMakeLists.txt and cxx file) and running: cmake -G "Visual Studio 15 2017 Win64" . I have a VTK_DIR environment variable set to /lib/cmake/vtk-# for the version of VTK I want to use, as was required when building examples against VTK 8.1. -Trinian ________________________________ From: Ben Boeckel Sent: February 8, 2019 1:39 PM To: Trinian Gordon Cc: VTK Users Mailing List Subject: Re: [vtkusers] Examples don't Configure with New Module Structure On Fri, Feb 08, 2019 at 20:24:53 +0000, Trinian Gordon wrote: > I'm trying to build the TissueLens example, along with other examples, > and all the examples that I have tried now fail in cmake with the > error message: Where does this example live? WikiExamples? Somewhere else? > Could not find the VTK package with the following required components: > CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, > FiltersSources, IOImage, InteractionStyle, RenderingContextOpenGL2, > RenderingCore, RenderingFreeType, RenderingOpenGL2. > > I am building against a master source build of VTK, and have noticed > that the /lib/cmake/vtk-#/Modules folder is no longer created with a > vtk build & install. CMake 3.10 vs 3.13.4 makes no difference. There's nothing to put in that directory. Modules are now just plain CMake targets with their usage requirements attached to them. > All of these modules are built and exist in the /lib and /bin folders, > but cmake doesn't find them. Any ideas? What CMake code are you using to find VTK? --Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Feb 8 16:17:37 2019 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 8 Feb 2019 16:17:37 -0500 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: <20190208203933.GD28631@rotor> Message-ID: <20190208211737.GA14730@rotor.kitware.com> On Fri, Feb 08, 2019 at 21:06:32 +0000, Trinian Gordon wrote: > It's from: > https://lorensen.github.io/VTKExamples/site/Cxx/Medical/TissueLens/ > > I'm downloading these examples, uncompressing to a folder, entering > that folder (which contains the CMakeLists.txt and cxx file) and > running: cmake -G "Visual Studio 15 2017 Win64" . > > I have a VTK_DIR environment variable set to /lib/cmake/vtk-# for the > version of VTK I want to use, as was required when building examples > against VTK 8.1. Bill said he had them updated. Are you using the latest `master` version of VTKExamples? --Ben From trinian.gordon at outlook.com Fri Feb 8 16:24:59 2019 From: trinian.gordon at outlook.com (Trinian Gordon) Date: Fri, 8 Feb 2019 21:24:59 +0000 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: <20190208211737.GA14730@rotor.kitware.com> References: <20190208203933.GD28631@rotor> , <20190208211737.GA14730@rotor.kitware.com> Message-ID: Yes, that's where the download link goes too. I downloaded it today to make sure. I've tried using the cmake-gui as well with the same result. ________________________________ From: Ben Boeckel Sent: February 8, 2019 2:17 PM To: Trinian Gordon Cc: VTK Users Mailing List Subject: Re: [vtkusers] Examples don't Configure with New Module Structure On Fri, Feb 08, 2019 at 21:06:32 +0000, Trinian Gordon wrote: > It's from: > https://lorensen.github.io/VTKExamples/site/Cxx/Medical/TissueLens/ > > I'm downloading these examples, uncompressing to a folder, entering > that folder (which contains the CMakeLists.txt and cxx file) and > running: cmake -G "Visual Studio 15 2017 Win64" . > > I have a VTK_DIR environment variable set to /lib/cmake/vtk-# for the > version of VTK I want to use, as was required when building examples > against VTK 8.1. Bill said he had them updated. Are you using the latest `master` version of VTKExamples? --Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Feb 8 19:07:45 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 Feb 2019 16:07:45 -0800 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: <20190208203933.GD28631@rotor> Message-ID: That should work. On Fri, Feb 8, 2019, 1:06 PM Trinian Gordon It's from: > https://lorensen.github.io/VTKExamples/site/Cxx/Medical/TissueLens/ > > I'm downloading these examples, uncompressing to a folder, entering that > folder (which contains the CMakeLists.txt and cxx file) and running: cmake > -G "Visual Studio 15 2017 Win64" . > > I have a VTK_DIR environment variable set to /lib/cmake/vtk-# for the > version of VTK I want to use, as was required when building examples > against VTK 8.1. > > -Trinian > ------------------------------ > *From:* Ben Boeckel > *Sent:* February 8, 2019 1:39 PM > *To:* Trinian Gordon > *Cc:* VTK Users Mailing List > *Subject:* Re: [vtkusers] Examples don't Configure with New Module > Structure > > On Fri, Feb 08, 2019 at 20:24:53 +0000, Trinian Gordon wrote: > > I'm trying to build the TissueLens example, along with other examples, > > and all the examples that I have tried now fail in cmake with the > > error message: > > Where does this example live? WikiExamples? Somewhere else? > > > Could not find the VTK package with the following required components: > > CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, > > FiltersSources, IOImage, InteractionStyle, RenderingContextOpenGL2, > > RenderingCore, RenderingFreeType, RenderingOpenGL2. > > > > I am building against a master source build of VTK, and have noticed > > that the /lib/cmake/vtk-#/Modules folder is no longer created with a > > vtk build & install. CMake 3.10 vs 3.13.4 makes no difference. > > There's nothing to put in that directory. Modules are now just plain > CMake targets with their usage requirements attached to them. > > > All of these modules are built and exist in the /lib and /bin folders, > > but cmake doesn't find them. Any ideas? > > What CMake code are you using to find VTK? > > --Ben > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Feb 8 19:12:50 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 Feb 2019 16:12:50 -0800 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: Message-ID: Where are you pointing VTK_DIR? On Fri, Feb 8, 2019 at 12:25 PM Trinian Gordon wrote: > > I'm trying to build the TissueLens example, along with other examples, and all the examples that I have tried now fail in cmake with the error message: > Could not find the VTK package with the following required components: CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, FiltersSources, IOImage, InteractionStyle, RenderingContextOpenGL2, RenderingCore, RenderingFreeType, RenderingOpenGL2. > > > I am building against a master source build of VTK, and have noticed that the /lib/cmake/vtk-#/Modules folder is no longer created with a vtk build & install. CMake 3.10 vs 3.13.4 makes no difference. > > All of these modules are built and exist in the /lib and /bin folders, but cmake doesn't find them. Any ideas? > > -Trinian > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From bill.lorensen at gmail.com Sat Feb 9 13:32:33 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 9 Feb 2019 10:32:33 -0800 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: Message-ID: Try removing the QUIET modifier in the CMakeLists.txt. You will get some more informative error message Bill On Fri, Feb 8, 2019, 4:12 PM Bill Lorensen Where are you pointing VTK_DIR? > > On Fri, Feb 8, 2019 at 12:25 PM Trinian Gordon > wrote: > > > > I'm trying to build the TissueLens example, along with other examples, > and all the examples that I have tried now fail in cmake with the error > message: > > Could not find the VTK package with the following required components: > CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, FiltersSources, > IOImage, InteractionStyle, RenderingContextOpenGL2, RenderingCore, > RenderingFreeType, RenderingOpenGL2. > > > > > > I am building against a master source build of VTK, and have noticed > that the /lib/cmake/vtk-#/Modules folder is no longer created with a vtk > build & install. CMake 3.10 vs 3.13.4 makes no difference. > > > > All of these modules are built and exist in the /lib and /bin folders, > but cmake doesn't find them. Any ideas? > > > > -Trinian > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsParadise at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sat Feb 9 16:36:22 2019 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 10 Feb 2019 08:36:22 +1100 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: Message-ID: I just ran a download and build in both Windows and Linux. There are no problems, so I think this is a path issue. In the top-level folder of your VTK build directory there is a file called windows_path.bat. This will give you the paths needed when you build against VTK. e.g. something like: set PATH=/Kitware/build/VTK-Debug/bin;%PATH% set PYTHONPATH= /Kitware/build/VTK-Debug/bin/Lib/site-packages;%PYTHONPATH% Regards Andrew > > ---------- Forwarded message ---------- > From: Bill Lorensen > To: Trinian Gordon > Cc: VTK Users Mailing List > Bcc: > Date: Fri, 8 Feb 2019 16:12:50 -0800 > Subject: Re: [vtkusers] Examples don't Configure with New Module Structure > Where are you pointing VTK_DIR? > > On Fri, Feb 8, 2019 at 12:25 PM Trinian Gordon > wrote: > > > > I'm trying to build the TissueLens example, along with other examples, > and all the examples that I have tried now fail in cmake with the error > message: > > Could not find the VTK package with the following required components: > CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, FiltersSources, > IOImage, InteractionStyle, RenderingContextOpenGL2, RenderingCore, > RenderingFreeType, RenderingOpenGL2. > > > > > > I am building against a master source build of VTK, and have noticed > that the /lib/cmake/vtk-#/Modules folder is no longer created with a vtk > build & install. CMake 3.10 vs 3.13.4 makes no difference. > > > > All of these modules are built and exist in the /lib and /bin folders, > but cmake doesn't find them. Any ideas? > > > > -Trinian > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsParadise at noware dot com > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alekseev at rambler.ru Sun Feb 10 13:33:14 2019 From: alekseev at rambler.ru (Andrey) Date: Sun, 10 Feb 2019 11:33:14 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer image quality problem In-Reply-To: <1548910454890-0.post@n5.nabble.com> References: <1548910454890-0.post@n5.nabble.com> Message-ID: <1549823594570-0.post@n5.nabble.com> The issue was solved by changing interpolation type in vtkImageReslice, it looks like this: auto reslice = dynamic_cast(rep->GetReslice()); reslice->SetInterpolationModeToLinear(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From alekseev at rambler.ru Mon Feb 11 03:58:13 2019 From: alekseev at rambler.ru (Andrey) Date: Mon, 11 Feb 2019 01:58:13 -0700 (MST) Subject: [vtkusers] vtkResliceCursorWidget issue Message-ID: <1549875493161-0.post@n5.nabble.com> Hi, can you give me any hint about strange vtkResliceCursorWidget behavior? I've written two videos. The first one was written when reslice mode set to oblique. I scroll throught slices in the left top window and image in the right and in the left bottom window constantly changing. But the slice doesn't changing for those views. And when the resclice cursor widget is on the top part of image the top border of image changing. And then it's on the bottom part - the bottom border of images changing. https://www.dropbox.com/s/ounxvy5z8e8y3v7/ice_video_20190211-114049.webm?dl=0 And the second video has written on the same data and the same situation. But reslice mode set to axis aligned. The right and the left botom images don't changing during scroll in the left top window. https://www.dropbox.com/s/1rbw18qpdi480qc/ice_video_20190211-114223.webm?dl=0 What the reason can be for such behavior? I'm using VTK 8.2.0 -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From trinian.gordon at outlook.com Mon Feb 11 12:24:11 2019 From: trinian.gordon at outlook.com (Trinian Gordon) Date: Mon, 11 Feb 2019 17:24:11 +0000 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: , Message-ID: Thanks Bill. Removing the quiet modifier showed a little bit more informative error message. I am building VTK with TBB and now need to manually specify the TBB parameters used to configure the VTK build in any examples I build against VTK. With the manual TBB specification, the examples will configure, build, and run. -Trinian ________________________________ From: Bill Lorensen Sent: February 9, 2019 11:32 AM To: Trinian Gordon Cc: VTK Users Mailing List Subject: Re: [vtkusers] Examples don't Configure with New Module Structure Try removing the QUIET modifier in the CMakeLists.txt. You will get some more informative error message Bill On Fri, Feb 8, 2019, 4:12 PM Bill Lorensen wrote: Where are you pointing VTK_DIR? On Fri, Feb 8, 2019 at 12:25 PM Trinian Gordon > wrote: > > I'm trying to build the TissueLens example, along with other examples, and all the examples that I have tried now fail in cmake with the error message: > Could not find the VTK package with the following required components: CommonCore, CommonDataModel, FiltersCore, FiltersGeneral, FiltersSources, IOImage, InteractionStyle, RenderingContextOpenGL2, RenderingCore, RenderingFreeType, RenderingOpenGL2. > > > I am building against a master source build of VTK, and have noticed that the /lib/cmake/vtk-#/Modules folder is no longer created with a vtk build & install. CMake 3.10 vs 3.13.4 makes no difference. > > All of these modules are built and exist in the /lib and /bin folders, but cmake doesn't find them. Any ideas? > > -Trinian > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Feb 11 13:57:18 2019 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 11 Feb 2019 13:57:18 -0500 Subject: [vtkusers] Examples don't Configure with New Module Structure In-Reply-To: References: Message-ID: <20190211185718.GA17315@megas.kitware.com> On Mon, Feb 11, 2019 at 17:24:11 +0000, Trinian Gordon wrote: > Thanks Bill. Removing the quiet modifier showed a little bit more > informative error message. > > I am building VTK with TBB and now need to manually specify the TBB > parameters used to configure the VTK build in any examples I build > against VTK. With the manual TBB specification, the examples will > configure, build, and run. Ah, that makes sense. Please see this issue to track fixing this in VTK: https://gitlab.kitware.com/vtk/vtk/issues/17503 --Ben From harry.glickman at mail.mcgill.ca Mon Feb 11 16:38:01 2019 From: harry.glickman at mail.mcgill.ca (HarryG) Date: Mon, 11 Feb 2019 14:38:01 -0700 (MST) Subject: [vtkusers] VTK Contouring, combining perpendicular polygons In-Reply-To: <1549052052462-0.post@n5.nabble.com> References: <1549052052462-0.post@n5.nabble.com> Message-ID: <1549921081097-0.post@n5.nabble.com> Hi , I?m writing a follow-up to my previous post: I have been mostly successful in combining stencil data from the three axes, simply using vtkImageStencilData -> Add(). My problem now is that the contours on the X and Y axes behave very strangely with my mask generation pathway (stacked polylines -> vtkLinearExtrusionFilter -> vtkPolyDataToImageStencil -> vtkImageStencil combined with blank mask), while on the z-slices it seems to work perfectly. I gather from the documentation this has something to do with the following warning in vtkPolyDataToImageStencil: ?If contours are provided, the contours must be aligned with the Z planes. Other contour orientations are not supported.?. Is there some way to get around this? In my mind any algorithm that works on the axial slices should work on the other slices, and I don?t understand why this isn?t the case. I?ve been trying to rotate the X and Y contours so they line up along the Z axis, but am stuck when trying to rotate the stencil back to the proper orientation to be combined with the others. Any advice would be greatly appreciated, Harry -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From akascap at gmail.com Tue Feb 12 03:10:09 2019 From: akascap at gmail.com (akaszynski) Date: Tue, 12 Feb 2019 01:10:09 -0700 (MST) Subject: [vtkusers] Equation Rendering Using Python Message-ID: <1549959009713-0.post@n5.nabble.com> Hello, I'm a developer of vtki , a Python module that tries to make interfacing with vtk through Python even easier than the existing Python module vtk. We're working on adding features and one that we're missing is Equation Rendering. There's clearly support for equation rendering within vtk (see Equation Rendering ), but I've been unable to find any examples, and the python module vtk lacks support for /vtkMathTextUtilities/. Is there a way to due this in Python with or without /matplotlib/? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sweet.factory_92 at hotmail.com Tue Feb 12 05:30:33 2019 From: sweet.factory_92 at hotmail.com (Anna1994) Date: Tue, 12 Feb 2019 03:30:33 -0700 (MST) Subject: [vtkusers] vtkBoxWidget for point cloud volume selection Message-ID: <1549967433582-0.post@n5.nabble.com> I have just started using VTK and there are still few things that I don't get. So far I have designed a software using QT+PCL+ VTK to import point cloud then I use VTK rubberband to select an area via AreaPickingEventOccurred function and crop that area out. I would like to use vtkBoxWidget2 instead of the rubberband so I can select certain area in the point cloud and crop out the points inside the box. There are few things that I saw in vtkBoxWidget2 that I am not sure if they are requirements or just for the example itself : 1- Renderer: So far I have a visualizer as follow setupUi(this); this->setWindowTitle("Vector Mapper"); viewer.reset (new pcl::visualization::PCLVisualizer ("viewer", false)); ui->qvtkWidget->SetRenderWindow (viewer->getRenderWindow ()); viewer->setupInteractor (ui->qvtkWidget->GetInteractor (), ui->qvtkWidget->GetRenderWindow ()); connect(ui->checkBoxCoordinate, SIGNAL(stateChanged(int)), this, SLOT(checkBoxCoordinateState(int))); connect(ui->checkBoxPCD, SIGNAL(stateChanged(int)), this, SLOT(checkBoxPCDState(int))); //Register viewer->registerKeyboardCallback (&vectorMapping::keyboardCallback, *this); viewer->registerMouseCallback (&vectorMapping::mouseCallback, *this); viewer->registerAreaPickingCallback(&vectorMapping::AreaPickingEventOccurred, *this); if I have a visualizer to view the point cloud do I need a rendered to draw the box? as I have tried to implement a renderer as well but when I import the point cloud it doesn't show in the visualizer 2- Actor and Mapper: are these required for point clouds or are they just there for rendered shapes? Any help is very much appreciated -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dan.lipsa at kitware.com Tue Feb 12 09:23:21 2019 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 12 Feb 2019 09:23:21 -0500 Subject: [vtkusers] Equation Rendering Using Python In-Reply-To: <1549959009713-0.post@n5.nabble.com> References: <1549959009713-0.post@n5.nabble.com> Message-ID: Hi, You'll need to enable vtkRenderingMatplotlib module. For an example for rendering math text look at TestMathTextActor.cxx Dan On Tue, Feb 12, 2019 at 3:13 AM akaszynski wrote: > Hello, > > I'm a developer of vtki , a Python > module that tries to make interfacing with vtk through Python even easier > than the existing Python module vtk. We're working on adding features and > one that we're missing is Equation Rendering. > > There's clearly support for equation rendering within vtk (see Equation > Rendering ), > but I've been unable to find any examples, and the python module vtk lacks > support for /vtkMathTextUtilities/. Is there a way to due this in Python > with or without /matplotlib/? > > Thanks! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alekseev at rambler.ru Tue Feb 12 14:24:40 2019 From: alekseev at rambler.ru (Andrey) Date: Tue, 12 Feb 2019 12:24:40 -0700 (MST) Subject: [vtkusers] vtkResliceCursorWidget issue Message-ID: <1549999480420-0.post@n5.nabble.com> Hi, can you give me any hint about strange vtkResliceCursorWidget behavior? I've written two videos. The first one was written when reslice mode set to oblique. I scroll throught slices in the left top window and image in the right and in the left bottom window constantly changing. But the slice doesn't changing for those views. And when the resclice cursor widget is on the top part of image the top border of image changing. And then it's on the bottom part - the bottom border of images changing. https://www.dropbox.com/s/ounxvy5z8e8y3v7/ice_video_20190211-114049.webm?dl=0 And the second video has written on the same data and the same situation. But reslice mode set to axis aligned. The right and the left botom images don't changing during scroll in the left top window. https://www.dropbox.com/s/1rbw18qpdi480qc/ice_video_20190211-114223.webm?dl=0 What the reason can be for such behavior? I'm using VTK 8.2.0 -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From harry.glickman at mail.mcgill.ca Tue Feb 12 16:28:43 2019 From: harry.glickman at mail.mcgill.ca (HarryG) Date: Tue, 12 Feb 2019 14:28:43 -0700 (MST) Subject: [vtkusers] VTK Contouring, combining perpendicular polygons In-Reply-To: <1549921081097-0.post@n5.nabble.com> References: <1549052052462-0.post@n5.nabble.com> <1549921081097-0.post@n5.nabble.com> Message-ID: <1550006923115-0.post@n5.nabble.com> I have implemented a feasible but probably suboptimal solution: I ended up flipping the axes of the sagittal and coronal plane contours to give them constant Z values, then I extruded and stenciled that flipped data, then I was able to manually flip the axes of the stencil back to the original orientation to be merged with the other axes. This whole process has felt pretty ridiculous, so I would love to hear if there is an easier way to do it, but this way works for now. Feel free to email if you have any questions on the details of my solution, and I can post the actual code here when it becomes open source in the coming months. Thanks, Harry -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Tue Feb 12 17:27:05 2019 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 12 Feb 2019 22:27:05 +0000 Subject: [vtkusers] VTK Contouring, combining perpendicular polygons In-Reply-To: <1550006923115-0.post@n5.nabble.com> References: <1549052052462-0.post@n5.nabble.com> <1549921081097-0.post@n5.nabble.com> <1550006923115-0.post@n5.nabble.com> Message-ID: > This whole process has felt pretty ridiculous Have a look at the source code and you'll see how the filter works and understand its limitations. Any contributions for improving the filter are welcome. VTK discussions have moved to https://discourse.vtk.org/. Please post further questions and comments there. Andras -----Original Message----- From: vtkusers On Behalf Of HarryG Sent: Tuesday, February 12, 2019 4:29 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK Contouring, combining perpendicular polygons I have implemented a feasible but probably suboptimal solution: I ended up flipping the axes of the sagittal and coronal plane contours to give them constant Z values, then I extruded and stenciled that flipped data, then I was able to manually flip the axes of the stencil back to the original orientation to be merged with the other axes. This whole process has felt pretty ridiculous, so I would love to hear if there is an easier way to do it, but this way works for now. Feel free to email if you have any questions on the details of my solution, and I can post the actual code here when it becomes open source in the coming months. Thanks, Harry -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7Ca1b9d6968ef5445f0f0e08d691318215%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636856039155393657&sdata=iQtwsqXIb31NBQN8FTgPmnmDSM906xP%2BBjz%2FCw6RuYA%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca1b9d6968ef5445f0f0e08d691318215%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636856039155393657&sdata=qXdRJoV3by2mQkeeKerzzTPKgqmatKAV7bgSWBJNEZY%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Ca1b9d6968ef5445f0f0e08d691318215%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636856039155393657&sdata=PprwIEZSRdQTX6tPCKWOuBw8Qre2KRYbqd1W1NfJxh8%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca1b9d6968ef5445f0f0e08d691318215%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636856039155403666&sdata=XcwrvsgZJj35L3ehlzNV6E%2B2otL5mpIBULuowY03CEI%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca1b9d6968ef5445f0f0e08d691318215%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636856039155403666&sdata=JtDYf69woX4ddw2Sn9ilCmr9SN8V%2Fqn5m7LoNKCBxYs%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca1b9d6968ef5445f0f0e08d691318215%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636856039155403666&sdata=J5jjOl5gFDAfxp1TPVtche2F2J6sWAfHQCb7l6kOCJg%3D&reserved=0 From T.Lim at hw.ac.uk Wed Feb 13 18:54:48 2019 From: T.Lim at hw.ac.uk (Lim, Theodore) Date: Wed, 13 Feb 2019 23:54:48 +0000 Subject: [vtkusers] OpenVR vtkCocoaOpenGLRenderWindow.h Message-ID: <171D15DA-36B3-4BB0-8A93-580A78C3EF83@hw.ac.uk> Hi, Is this header file vtkCocoaOpenGLRenderWindow.h available? vtkOpenVRRenderWindow.cxx asks for it. When building openVR on mac this header is missing and is also not found in Git. Thanks, Theo. ________________________________ Heriot-Watt University is The Times & The Sunday Times International University of the Year 2018 Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes: 1. Heriot-Watt University, a Scottish charity registered under number SC000278 2. Edinburgh Business School a Charity Registered in Scotland, SC026900. Edinburgh Business School is a company limited by guarantee, registered in Scotland with registered number SC173556 and registered office at Heriot-Watt University Finance Office, Riccarton, Currie, Midlothian, EH14 4AS 3. Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS. The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. From sean at rogue-research.com Wed Feb 13 19:02:55 2019 From: sean at rogue-research.com (Sean McBride) Date: Wed, 13 Feb 2019 19:02:55 -0500 Subject: [vtkusers] OpenVR vtkCocoaOpenGLRenderWindow.h In-Reply-To: <171D15DA-36B3-4BB0-8A93-580A78C3EF83@hw.ac.uk> References: <171D15DA-36B3-4BB0-8A93-580A78C3EF83@hw.ac.uk> Message-ID: <20190214000255.830969929@mail.rogue-research.com> On Wed, 13 Feb 2019 23:54:48 +0000, Lim, Theodore said: >Is this header file vtkCocoaOpenGLRenderWindow.h available? It does not. But vtkCocoaRenderWindow.h does. >vtkOpenVRRenderWindow.cxx asks for it. Definitely a copy-pasto. These files do exist: vtkGenericOpenGLRenderWindow.h vtkXOpenGLRenderWindow.h vtkCocoaRenderWindow.h vtkEGLRenderWindow.h vtkOpenGLRenderWindow.h vtkOSOpenGLRenderWindow.h vtkWin32OpenGLRenderWindow.h vtkIOSRenderWindow.h Notice some have OpenGL in the name, some do not. This inconsistency likely caused someone to use the wrong name I guess. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From T.Lim at hw.ac.uk Wed Feb 13 19:11:03 2019 From: T.Lim at hw.ac.uk (Lim, Theodore) Date: Thu, 14 Feb 2019 00:11:03 +0000 Subject: [vtkusers] OpenVR vtkCocoaOpenGLRenderWindow.h In-Reply-To: <20190214000255.830969929@mail.rogue-research.com> References: <171D15DA-36B3-4BB0-8A93-580A78C3EF83@hw.ac.uk> <20190214000255.830969929@mail.rogue-research.com> Message-ID: Much appreciated, Sean. I?ve tried vtkCocoaRenderWindow.h but it kicked up a fuss. Will explore further. Many thanks, Theo. > On 14 Feb 2019, at 00:02, Sean McBride wrote: > > On Wed, 13 Feb 2019 23:54:48 +0000, Lim, Theodore said: > >> Is this header file vtkCocoaOpenGLRenderWindow.h available? > > It does not. But vtkCocoaRenderWindow.h does. > >> vtkOpenVRRenderWindow.cxx asks for it. > > Definitely a copy-pasto. These files do exist: > > vtkGenericOpenGLRenderWindow.h > vtkXOpenGLRenderWindow.h > vtkCocoaRenderWindow.h > vtkEGLRenderWindow.h > vtkOpenGLRenderWindow.h > vtkOSOpenGLRenderWindow.h > vtkWin32OpenGLRenderWindow.h > vtkIOSRenderWindow.h > > Notice some have OpenGL in the name, some do not. This inconsistency likely caused someone to use the wrong name I guess. > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > ________________________________ Heriot-Watt University is The Times & The Sunday Times International University of the Year 2018 Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes: 1. Heriot-Watt University, a Scottish charity registered under number SC000278 2. Edinburgh Business School a Charity Registered in Scotland, SC026900. Edinburgh Business School is a company limited by guarantee, registered in Scotland with registered number SC173556 and registered office at Heriot-Watt University Finance Office, Riccarton, Currie, Midlothian, EH14 4AS 3. Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS. The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. From sean at rogue-research.com Wed Feb 13 19:15:10 2019 From: sean at rogue-research.com (Sean McBride) Date: Wed, 13 Feb 2019 19:15:10 -0500 Subject: [vtkusers] OpenVR vtkCocoaOpenGLRenderWindow.h In-Reply-To: References: <171D15DA-36B3-4BB0-8A93-580A78C3EF83@hw.ac.uk> <20190214000255.830969929@mail.rogue-research.com> Message-ID: <20190214001510.1571956945@mail.rogue-research.com> On Thu, 14 Feb 2019 00:11:03 +0000, Lim, Theodore said: >I?ve tried vtkCocoaRenderWindow.h but it kicked up a fuss. Will explore >further. You are clearly the first to *actually* compile this config, so likely it's never been tested. :) Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From alekseev at rambler.ru Fri Feb 15 01:13:43 2019 From: alekseev at rambler.ru (Andrey) Date: Thu, 14 Feb 2019 23:13:43 -0700 (MST) Subject: [vtkusers] vtkResliceCursorWidget issue In-Reply-To: <1549999480420-0.post@n5.nabble.com> References: <1549999480420-0.post@n5.nabble.com> Message-ID: <1550211223095-0.post@n5.nabble.com> Hi, I prepared a couple of screenshots to illustrate the problem. May be it will be more suitable than videos. The first one shows the initial state after loading DICOM images. On the second image I scroll through a few slices on top left window. You can see a black rectangle on the two other views and blurred bottom edge of image. What's the reason for such behavior? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bebe0705 at colorado.edu Sat Feb 16 16:41:16 2019 From: bebe0705 at colorado.edu (BBerco) Date: Sat, 16 Feb 2019 14:41:16 -0700 (MST) Subject: [vtkusers] Double precision in vertices coordinates of vtkPolydata from filter? Message-ID: <1550353276551-0.post@n5.nabble.com> Is there a way to obtain a vtkPolyData with double precision coordinates from vtkAlgorithms ? The vtkAlgorithm documentation does mention a DesiredOutputPrecision enumeration but there is apparently no method making use of this enumeration. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Feb 18 09:26:52 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 18 Feb 2019 09:26:52 -0500 Subject: [vtkusers] Double precision in vertices coordinates of vtkPolydata from filter? In-Reply-To: <1550353276551-0.post@n5.nabble.com> References: <1550353276551-0.post@n5.nabble.com> Message-ID: Hi, This email address will be retired in the near future. Please post new questions at https://discourse.vtk.org. Specification of the output precision type of point coordinates is not available in vtkAlgorithm since vtkAlgorithm can operate on datasets without points. Instead, the output precision can be set in a selection of algorithms, including: Filters/Core/vtkAppendPolyData.h Filters/Core/vtkCleanPolyData.h Filters/Core/vtkClipPolyData.h Filters/Core/vtkConnectivityFilter.h Filters/Core/vtkDecimatePolylineFilter.h Filters/Core/vtkDecimatePro.h Filters/Core/vtkDelaunay3D.h Filters/Core/vtkFeatureEdges.h Filters/Core/vtkGlyph3D.h Filters/Core/vtkHedgeHog.h Filters/Core/vtkMaskPoints.h Filters/Core/vtkPolyDataConnectivityFilter.h Filters/Core/vtkSmoothPolyDataFilter.h Filters/Core/vtkStaticCleanPolyData.h Filters/Core/vtkThresholdPoints.h Filters/Core/vtkTubeFilter.h Filters/General/vtkAppendPoints.h Filters/General/vtkTransformFilter.h Filters/General/vtkTransformPolyDataFilter.h Filters/Geometry/vtkLinearToQuadraticCellsFilter.h Filters/Hybrid/vtkProcrustesAlignmentFilter.h Filters/Modeling/vtkAdaptiveSubdivisionFilter.h Filters/Points/vtkBoundedPointSource.h Filters/Sources/vtkArcSource.h Filters/Sources/vtkConeSource.h Filters/Sources/vtkCubeSource.h Filters/Sources/vtkCylinderSource.h Filters/Sources/vtkDiskSource.h Filters/Sources/vtkEllipseArcSource.h Filters/Sources/vtkEllipticalButtonSource.h Filters/Sources/vtkFrustumSource.h Filters/Sources/vtkGlyphSource2D.h Filters/Sources/vtkLineSource.h Filters/Sources/vtkOutlineSource.h Filters/Sources/vtkParametricFunctionSource.h Filters/Sources/vtkPlaneSource.h Filters/Sources/vtkPlatonicSolidSource.h Filters/Sources/vtkPointSource.h Filters/Sources/vtkRectangularButtonSource.h Filters/Sources/vtkRegularPolygonSource.h Filters/Sources/vtkSphereSource.h Filters/Sources/vtkSuperquadricSource.h Filters/Sources/vtkTessellatedBoxSource.h Filters/Sources/vtkTextSource.h Filters/Sources/vtkTexturedSphereSource.h Imaging/Hybrid/vtkImageToPoints.h Rendering/Image/vtkDepthImageToPointCloud.h HTH, Cory On Sat, Feb 16, 2019 at 4:45 PM BBerco wrote: > Is there a way to obtain a vtkPolyData with double precision coordinates > from > vtkAlgorithms ? The vtkAlgorithm documentation does mention a > DesiredOutputPrecision enumeration but there is apparently no method making > use of this enumeration. > > > > -- > 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 cory.quammen at kitware.com Mon Feb 18 09:27:27 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 18 Feb 2019 09:27:27 -0500 Subject: [vtkusers] Double precision in vertices coordinates of vtkPolydata from filter? In-Reply-To: References: <1550353276551-0.post@n5.nabble.com> Message-ID: > This email address will be retired in the near future. Please post new questions at https://discourse.vtk.org. Email list, I mean. On Mon, Feb 18, 2019 at 9:26 AM Cory Quammen wrote: > Hi, > > This email address will be retired in the near future. Please post new > questions at https://discourse.vtk.org. > > Specification of the output precision type of point coordinates is not > available in vtkAlgorithm since vtkAlgorithm can operate on datasets > without points. > > Instead, the output precision can be set in a selection of algorithms, > including: > > Filters/Core/vtkAppendPolyData.h > Filters/Core/vtkCleanPolyData.h > Filters/Core/vtkClipPolyData.h > Filters/Core/vtkConnectivityFilter.h > Filters/Core/vtkDecimatePolylineFilter.h > Filters/Core/vtkDecimatePro.h > Filters/Core/vtkDelaunay3D.h > Filters/Core/vtkFeatureEdges.h > Filters/Core/vtkGlyph3D.h > Filters/Core/vtkHedgeHog.h > Filters/Core/vtkMaskPoints.h > Filters/Core/vtkPolyDataConnectivityFilter.h > Filters/Core/vtkSmoothPolyDataFilter.h > Filters/Core/vtkStaticCleanPolyData.h > Filters/Core/vtkThresholdPoints.h > Filters/Core/vtkTubeFilter.h > Filters/General/vtkAppendPoints.h > Filters/General/vtkTransformFilter.h > Filters/General/vtkTransformPolyDataFilter.h > Filters/Geometry/vtkLinearToQuadraticCellsFilter.h > Filters/Hybrid/vtkProcrustesAlignmentFilter.h > Filters/Modeling/vtkAdaptiveSubdivisionFilter.h > Filters/Points/vtkBoundedPointSource.h > Filters/Sources/vtkArcSource.h > Filters/Sources/vtkConeSource.h > Filters/Sources/vtkCubeSource.h > Filters/Sources/vtkCylinderSource.h > Filters/Sources/vtkDiskSource.h > Filters/Sources/vtkEllipseArcSource.h > Filters/Sources/vtkEllipticalButtonSource.h > Filters/Sources/vtkFrustumSource.h > Filters/Sources/vtkGlyphSource2D.h > Filters/Sources/vtkLineSource.h > Filters/Sources/vtkOutlineSource.h > Filters/Sources/vtkParametricFunctionSource.h > Filters/Sources/vtkPlaneSource.h > Filters/Sources/vtkPlatonicSolidSource.h > Filters/Sources/vtkPointSource.h > Filters/Sources/vtkRectangularButtonSource.h > Filters/Sources/vtkRegularPolygonSource.h > Filters/Sources/vtkSphereSource.h > Filters/Sources/vtkSuperquadricSource.h > Filters/Sources/vtkTessellatedBoxSource.h > Filters/Sources/vtkTextSource.h > Filters/Sources/vtkTexturedSphereSource.h > Imaging/Hybrid/vtkImageToPoints.h > Rendering/Image/vtkDepthImageToPointCloud.h > > > HTH, > Cory > > On Sat, Feb 16, 2019 at 4:45 PM BBerco wrote: > >> Is there a way to obtain a vtkPolyData with double precision coordinates >> from >> vtkAlgorithms ? The vtkAlgorithm documentation does mention a >> DesiredOutputPrecision enumeration but there is apparently no method >> making >> use of this enumeration. >> >> >> >> -- >> 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. > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Mon Feb 18 10:46:03 2019 From: bebe0705 at colorado.edu (BBerco) Date: Mon, 18 Feb 2019 08:46:03 -0700 (MST) Subject: [vtkusers] Double precision in vertices coordinates of vtkPolydata from filter? In-Reply-To: References: <1550353276551-0.post@n5.nabble.com> Message-ID: <1550504763057-0.post@n5.nabble.com> Awesome, thank you! Heads-up, it seems that the vtkAlgorithm class documentation for this enumeration is deprecated. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Feb 18 11:42:06 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 18 Feb 2019 11:42:06 -0500 Subject: [vtkusers] Double precision in vertices coordinates of vtkPolydata from filter? In-Reply-To: <1550504763057-0.post@n5.nabble.com> References: <1550353276551-0.post@n5.nabble.com> <1550504763057-0.post@n5.nabble.com> Message-ID: I have updated the list of algorithms in the header: https://gitlab.kitware.com/vtk/vtk/merge_requests/5215 On Mon, Feb 18, 2019 at 10:49 AM BBerco wrote: > Awesome, thank you! Heads-up, it seems that the vtkAlgorithm class > documentation for this enumeration is deprecated. > > > > -- > 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 pbergeron at spiria.com Mon Feb 18 19:07:41 2019 From: pbergeron at spiria.com (Patrick Bergeron) Date: Tue, 19 Feb 2019 00:07:41 +0000 Subject: [vtkusers] Passing arbitrary float data to a shader through a vtkTexture Message-ID: Hi. I am trying to pass custom float data to my shader in the form of a vtkTexture which contains VTK_FLOAT data (4 components). As per the documentation, it appears that float data in the image buffer gets clamped in the 0-1 range, which is a huge problem for me as I'm only getting 0-1 data in the shader: I need the pixel data to be the actual float data (which can be anything, not restricted to any particular range). How can I do this in VTK ? Patrick. -------------- next part -------------- An HTML attachment was scrubbed... URL: From akascap at gmail.com Tue Feb 19 05:48:44 2019 From: akascap at gmail.com (akaszynski) Date: Tue, 19 Feb 2019 03:48:44 -0700 (MST) Subject: [vtkusers] Equation Rendering Using Python In-Reply-To: References: <1549959009713-0.post@n5.nabble.com> Message-ID: <1550573324591-0.post@n5.nabble.com> While I could rebuild vtk locally, I?m building a python module that assumes the user only has access to the python wheel built for vtk on PyPi, which hasn?t included support for equation rendering. Regardless, I can still generate rendered equations and even feed it into a vtkImageData object. Is there an example of how I can connect this object to an existing text label or text property? This appears to be the approach that?s used internally by vtk to take externally rendered images and place them where plain text would normally be. Examples in Python or C++ (really any language) would be great. Thanks in advance for your help! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Tue Feb 19 08:30:18 2019 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 19 Feb 2019 08:30:18 -0500 Subject: [vtkusers] [vtk-developers] Passing arbitrary float data to a shader through a vtkTexture In-Reply-To: References: Message-ID: Two different things here I think I believe float data in the texture is the full range as long as the underlying VTK data type is float. The image buffer (pixels that get drawn to) by default is unsigned char normalized 0 to 1. To use float you need a float backed image buffer. Something like https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/OpenGL2/Testing/Cxx/TestFramebufferHDR.cxx But even with that example in the end the framebuffer will be blitted to screen which is typically an 8bit buffer. But at least in that example you can accumulate etc in floating point all you want prior to that final blit to the screen. On Mon, Feb 18, 2019 at 7:07 PM Patrick Bergeron wrote: > Hi. > > > I am trying to pass custom float data to my shader in the form of a > vtkTexture which contains VTK_FLOAT data (4 components). > > > As per the documentation, it appears that float data in the > image buffer gets clamped in the 0-1 range, which is a huge problem for me > as I'm only getting 0-1 data in the shader: I need the pixel data to be the > actual float data (which can be anything, not restricted to any particular > range). > > > How can I do this in VTK ? > > > Patrick. > > > _______________________________________________ > 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 > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Feb 19 08:47:55 2019 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 19 Feb 2019 08:47:55 -0500 Subject: [vtkusers] Equation Rendering Using Python In-Reply-To: <1550573324591-0.post@n5.nabble.com> References: <1549959009713-0.post@n5.nabble.com> <1550573324591-0.post@n5.nabble.com> Message-ID: Not that I am aware of. I would look at how TestMathTextActor.cxx is implemented. @Allison Vacanti might give you better pointers. On Tue, Feb 19, 2019 at 5:52 AM akaszynski wrote: > While I could rebuild vtk locally, I?m building a python module that > assumes > the user only has access to the python wheel built for vtk on PyPi, which > hasn?t included support for equation rendering. > > Regardless, I can still generate rendered equations and even feed it into a > vtkImageData object. Is there an example of how I can connect this object > to an existing text label or text property? This appears to be the > approach > that?s used internally by vtk to take externally rendered images and place > them where plain text would normally be. > > Examples in Python or C++ (really any language) would be great. > > Thanks in advance 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Tue Feb 19 09:05:58 2019 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Tue, 19 Feb 2019 09:05:58 -0500 Subject: [vtkusers] Equation Rendering Using Python In-Reply-To: References: <1549959009713-0.post@n5.nabble.com> <1550573324591-0.post@n5.nabble.com> Message-ID: Internally, VTK renders text using vtkTextRenderer, which automatically supports equation rendering when vtkRenderingMatplotlib is enabled. Any code using vtkTextRenderer to generate a texture/path from a string gets this capability, including vtkTextActor, vtkTextActor3D, vtkTextMapper, and vtkBillboardTextActor3D. If you have your own image data that you've been rendering yourself and want to display it as text, you can built a rectangular polydata and apply the image data as a texture. Take a look at the implementation of vtkBillboardTextActor3D for a good example of this: https://github.com/Kitware/VTK/blob/master/Rendering/Core/vtkBillboardTextActor3D.cxx HTH, Allie On Tue, Feb 19, 2019 at 8:48 AM Dan Lipsa wrote: > Not that I am aware of. I would look at how TestMathTextActor.cxx is > implemented. > > @Allison Vacanti might give you better > pointers. > > On Tue, Feb 19, 2019 at 5:52 AM akaszynski wrote: > >> While I could rebuild vtk locally, I?m building a python module that >> assumes >> the user only has access to the python wheel built for vtk on PyPi, which >> hasn?t included support for equation rendering. >> >> Regardless, I can still generate rendered equations and even feed it into >> a >> vtkImageData object. Is there an example of how I can connect this object >> to an existing text label or text property? This appears to be the >> approach >> that?s used internally by vtk to take externally rendered images and place >> them where plain text would normally be. >> >> Examples in Python or C++ (really any language) would be great. >> >> Thanks in advance 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 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbergeron at spiria.com Tue Feb 19 12:42:04 2019 From: pbergeron at spiria.com (Patrick Bergeron) Date: Tue, 19 Feb 2019 17:42:04 +0000 Subject: [vtkusers] [vtk-developers] Passing arbitrary float data to a shader through a vtkTexture In-Reply-To: References: , Message-ID: Hi Ken I believe float data in the texture is the full range as long as the underlying VTK data type is float. I would have assumed so too! But as per my follow up note I sent just a little while ago, the floats are unfortunately not the full range as they get converted to rgba 8 bit per channel in the vtkOpenGLTexture::Load() function ?- for which I submitted a simple fix to indeed keep the full range. Just to be clear, I need to pass data to a shader in order to shade a triangle mesh in a particular way. I don?t need to write to a float framebuffer. The data I need is not pixels and it?s not colors. It?s a float array used for some arbitrary shader computation. I used to pass these floats as uniform data to the shader but I ran out of uniforms and had to encode this data elsewhere, eg: in an image buffer instead. In my shader I access this data with the glsl function texelFetch() instead of reading a uniform. Patrick Bergeron On Feb 19, 2019, at 08:30, Ken Martin > wrote: Two different things here I think I believe float data in the texture is the full range as long as the underlying VTK data type is float. The image buffer (pixels that get drawn to) by default is unsigned char normalized 0 to 1. To use float you need a float backed image buffer. Something like https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/OpenGL2/Testing/Cxx/TestFramebufferHDR.cxx But even with that example in the end the framebuffer will be blitted to screen which is typically an 8bit buffer. But at least in that example you can accumulate etc in floating point all you want prior to that final blit to the screen. On Mon, Feb 18, 2019 at 7:07 PM Patrick Bergeron > wrote: Hi. I am trying to pass custom float data to my shader in the form of a vtkTexture which contains VTK_FLOAT data (4 components). As per the documentation, it appears that float data in the image buffer gets clamped in the 0-1 range, which is a huge problem for me as I'm only getting 0-1 data in the shader: I need the pixel data to be the actual float data (which can be anything, not restricted to any particular range). How can I do this in VTK ? Patrick. _______________________________________________ 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 -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From patricio.sandana at synopsys.com Wed Feb 20 12:11:29 2019 From: patricio.sandana at synopsys.com (Pato Sandana) Date: Wed, 20 Feb 2019 17:11:29 +0000 Subject: [vtkusers] [vtk-developers] Passing arbitrary float data to a shader Message-ID: <4A2A9A281AE5D54CA205FB13069FD8740191829132@us01wembx1.internal.synopsys.com> Hi Patrick, What you ask is more a GLSL topic than VTK I guess. What you need is the texelFetch() method instead the texture() one. texture() clamps the values to 0-1 extent. texelFetch returns the actual value stored and with floatBitsToInt you can even "encode/decode" integer values if needed. Hope that helps. Cheers, Pato ---------------------------------------------------------------------- Message: 1 Date: Tue, 19 Feb 2019 17:42:04 +0000 From: Patrick Bergeron To: Ken Martin Cc: "vtk-developers at vtk.org" , "vtkusers at vtk.org" Subject: Re: [vtkusers] [vtk-developers] Passing arbitrary float data to a shader through a vtkTexture Message-ID: Content-Type: text/plain; charset="utf-8" Hi Ken I believe float data in the texture is the full range as long as the underlying VTK data type is float. I would have assumed so too! But as per my follow up note I sent just a little while ago, the floats are unfortunately not the full range as they get converted to rgba 8 bit per channel in the vtkOpenGLTexture::Load() function ?- for which I submitted a simple fix to indeed keep the full range. Just to be clear, I need to pass data to a shader in order to shade a triangle mesh in a particular way. I don?t need to write to a float framebuffer. The data I need is not pixels and it?s not colors. It?s a float array used for some arbitrary shader computation. I used to pass these floats as uniform data to the shader but I ran out of uniforms and had to encode this data elsewhere, eg: in an image buffer instead. In my shader I access this data with the glsl function texelFetch() instead of reading a uniform. Patrick Bergeron On Feb 19, 2019, at 08:30, Ken Martin > wrote: Two different things here I think I believe float data in the texture is the full range as long as the underlying VTK data type is float. The image buffer (pixels that get drawn to) by default is unsigned char normalized 0 to 1. To use float you need a float backed image buffer. Something like https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.kitware.com_vtk_vtk_blob_master_Rendering_OpenGL2_Testing_Cxx_TestFramebufferHDR.cxx&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=OXsDLuWRk0bqurZ8S1YpkBj9pIW3dnVnEw8dFtKIEx8&e= But even with that example in the end the framebuffer will be blitted to screen which is typically an 8bit buffer. But at least in that example you can accumulate etc in floating point all you want prior to that final blit to the screen. On Mon, Feb 18, 2019 at 7:07 PM Patrick Bergeron > wrote: Hi. I am trying to pass custom float data to my shader in the form of a vtkTexture which contains VTK_FLOAT data (4 components). As per the documentation, it appears that float data in the image buffer gets clamped in the 0-1 range, which is a huge problem for me as I'm only getting 0-1 data in the shader: I need the pixel data to be the actual float data (which can be anything, not restricted to any particular range). How can I do this in VTK ? Patrick. _______________________________________________ Powered by https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=2hV0T4ypSq-ERHhId-3ZBxUR0z8CA8opMwr3WW7kyMg&e= Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=bwwTiiU3rScC-V9yRd5uQWuZPIPNOOde4Xfa0Bw_Q6k&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtk-2Ddevelopers&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=yA_HNPLVuk03J-jKrVTI9l0bAEQFLnsi7wnmzCXNv58&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtk-2Ddevelopers&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=5ymapB7shDgmY0MeTYyc5B8KpCGBSxi-cDAjgeHl4qY&e= -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ Powered by https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=2hV0T4ypSq-ERHhId-3ZBxUR0z8CA8opMwr3WW7kyMg&e= Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=bwwTiiU3rScC-V9yRd5uQWuZPIPNOOde4Xfa0Bw_Q6k&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=BU8EfzGavnmjxNdeepjqaZcIwWOdMcL4ZbiSsyrGoVQ&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=qqanjlkkOLXC9ZMA_Fo7ioqxkuIyEEXQvu2n7gg3iR8&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=RTHchWjhlQtHtkpaYSjNSag78sFhFdYa6LnDJBrNgcw&m=eJsgUc3SPtxFawzKQAvC2axRmCBvC5XtisU7BG-b01Q&s=hLJwxkWX6YPd9cUkAzkQqO1X6Nlh6o4iGoe3-cpGngo&e= From atapp001 at odu.edu Wed Feb 20 18:13:37 2019 From: atapp001 at odu.edu (artapp) Date: Wed, 20 Feb 2019 16:13:37 -0700 (MST) Subject: [vtkusers] Application Cannot Open Files Specific to its use Message-ID: <1550704417186-0.post@n5.nabble.com> I am trying to use the VTK example "SimplePointsReader", which has built and produces the application file. However, when the application is run in the terminal window, the error message "The document 'simple.xyz' could not be opened. SimplePointReader cannot open files of this type." (screenshot). This also happens with "PNGReader", same error, but with PNGReader instead of SimplePointReader, and "PNG files" instead of just 'files'. Why am I unable to view these files within the application? Thanks, Austin I am using the most recent version of VTK and Xcode, and Mac software version 10.14.3. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Feb 20 19:08:15 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Feb 2019 16:08:15 -0800 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: <1550704417186-0.post@n5.nabble.com> References: <1550704417186-0.post@n5.nabble.com> Message-ID: Try giving the complete filename. On Wed, Feb 20, 2019 at 3:18 PM artapp wrote: > > I am trying to use the VTK example "SimplePointsReader", which has built and > produces the application file. However, when the application is run in the > terminal window, the error message "The document 'simple.xyz' could not be > opened. SimplePointReader cannot open files of this type." (screenshot). > This also happens with "PNGReader", same error, but with PNGReader instead > of SimplePointReader, and "PNG files" instead of just 'files'. Why am I > unable to view these files within the application? > > Thanks, > Austin > > I am using the most recent version of VTK and Xcode, and Mac software > version 10.14.3. > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From atapp001 at odu.edu Wed Feb 20 19:33:48 2019 From: atapp001 at odu.edu (artapp) Date: Wed, 20 Feb 2019 17:33:48 -0700 (MST) Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: References: <1550704417186-0.post@n5.nabble.com> Message-ID: <1550709228375-0.post@n5.nabble.com> I'm not sure what you mean... I've already specified the full name of the file to be opened with the terminal code "open -a SimplePointsReader simple.xyz" after specifying the path of the application and the file to be opened (they are both in the same path). -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Feb 20 20:15:54 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Feb 2019 17:15:54 -0800 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: <1550709228375-0.post@n5.nabble.com> References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> Message-ID: Include the full path, something like: C;/somefolder/simplepoints.xyz On Wed, Feb 20, 2019, 4:37 PM artapp wrote: > I'm not sure what you mean... I've already specified the full name of the > file to be opened with the terminal code "open -a SimplePointsReader > simple.xyz" after specifying the path of the application and the file to > be > opened (they are both in the same path). > > > > -- > 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 atapp001 at odu.edu Wed Feb 20 20:44:12 2019 From: atapp001 at odu.edu (artapp) Date: Wed, 20 Feb 2019 18:44:12 -0700 (MST) Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> Message-ID: <1550713452050-0.post@n5.nabble.com> I've already declared the path previously and I'm able to open the image using "open simple.xyz" in the command window, but this results in the file opening with another application and not the SimplePointsReader application. I've also followed the steps under "Download and Build" directly from this link (https://vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader) and the same result occurs. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chinander at gmail.com Wed Feb 20 20:58:28 2019 From: chinander at gmail.com (Mike Chinander) Date: Wed, 20 Feb 2019 19:58:28 -0600 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: <1550713452050-0.post@n5.nabble.com> References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> Message-ID: What happens if you omit the 'open -a' part? Just type the command as it's listed on the Wiki page. ./SimplePointsReader simple.xyz https://vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader On Wed, Feb 20, 2019 at 7:48 PM artapp wrote: > I've already declared the path previously and I'm able to open the image > using "open simple.xyz" in the command window, but this results in the > file > opening with another application and not the SimplePointsReader > application. > I've also followed the steps under "Download and Build" directly from this > link (https://vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader) and the > same result occurs. > > > > -- > 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 bill.lorensen at gmail.com Wed Feb 20 21:05:55 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Feb 2019 18:05:55 -0800 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: <1550713452050-0.post@n5.nabble.com> References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> Message-ID: Please try passing the argument with its full path. The path you set specifies where to find the program. On Wed, Feb 20, 2019, 5:48 PM artapp wrote: > I've already declared the path previously and I'm able to open the image > using "open simple.xyz" in the command window, but this results in the > file > opening with another application and not the SimplePointsReader > application. > I've also followed the steps under "Download and Build" directly from this > link (https://vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader) and the > same result occurs. > > > > -- > 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 atapp001 at odu.edu Wed Feb 20 21:02:16 2019 From: atapp001 at odu.edu (artapp) Date: Wed, 20 Feb 2019 19:02:16 -0700 (MST) Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> Message-ID: <1550714536897-0.post@n5.nabble.com> -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From atapp001 at odu.edu Wed Feb 20 21:06:03 2019 From: atapp001 at odu.edu (artapp) Date: Wed, 20 Feb 2019 19:06:03 -0700 (MST) Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> Message-ID: <1550714763903-0.post@n5.nabble.com> I've already done this, and the program itself (as an application) will open and run. However, there is just a blank box and the target file cannot be loaded into the application. This can be seen to some degree in the first screenshot, however, not very clearly as this forum limits the size of files that can be uploaded.... -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Feb 20 21:23:21 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Feb 2019 18:23:21 -0800 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: <1550714763903-0.post@n5.nabble.com> References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> <1550714763903-0.post@n5.nabble.com> Message-ID: Send me the full res screenshot. On Wed, Feb 20, 2019, 6:10 PM artapp wrote: > I've already done this, and the program itself (as an application) will > open > and run. However, there is just a blank box and the target file cannot be > loaded into the application. This can be seen to some degree in the first > screenshot, however, not very clearly as this forum limits the size of > files > that can be uploaded.... > > > > -- > 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 atapp001 at odu.edu Wed Feb 20 21:28:58 2019 From: atapp001 at odu.edu (Austin Tapp) Date: Wed, 20 Feb 2019 21:28:58 -0500 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> <1550714763903-0.post@n5.nabble.com> Message-ID: = [image: Screen Shot 2019-02-20 at 6.06.54 PM.png] On Wed, Feb 20, 2019 at 9:23 PM Bill Lorensen wrote: > Send me the full res screenshot. > > On Wed, Feb 20, 2019, 6:10 PM artapp wrote: > >> I've already done this, and the program itself (as an application) will >> open >> and run. However, there is just a blank box and the target file cannot be >> loaded into the application. This can be seen to some degree in the first >> screenshot, however, not very clearly as this forum limits the size of >> files >> that can be uploaded.... >> >> >> >> -- >> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2019-02-20 at 6.06.54 PM.png Type: image/png Size: 2152276 bytes Desc: not available URL: From bill.lorensen at gmail.com Thu Feb 21 00:33:22 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Feb 2019 21:33:22 -0800 Subject: [vtkusers] Application Cannot Open Files Specific to its use In-Reply-To: References: <1550704417186-0.post@n5.nabble.com> <1550709228375-0.post@n5.nabble.com> <1550713452050-0.post@n5.nabble.com> <1550714763903-0.post@n5.nabble.com> Message-ID: Why are you using open? Run the executable directly. On Wed, Feb 20, 2019, 6:29 PM Austin Tapp wrote: > = > [image: Screen Shot 2019-02-20 at 6.06.54 PM.png] > > On Wed, Feb 20, 2019 at 9:23 PM Bill Lorensen > wrote: > >> Send me the full res screenshot. >> >> On Wed, Feb 20, 2019, 6:10 PM artapp wrote: >> >>> I've already done this, and the program itself (as an application) will >>> open >>> and run. However, there is just a blank box and the target file cannot >>> be >>> loaded into the application. This can be seen to some degree in the >>> first >>> screenshot, however, not very clearly as this forum limits the size of >>> files >>> that can be uploaded.... >>> >>> >>> >>> -- >>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2019-02-20 at 6.06.54 PM.png Type: image/png Size: 2152276 bytes Desc: not available URL: From jmax.red at gmail.com Thu Feb 21 04:19:17 2019 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Thu, 21 Feb 2019 10:19:17 +0100 Subject: [vtkusers] Java multi-thread and model Observer Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamdi.saadana at yahoo.com Thu Feb 21 08:53:46 2019 From: hamdi.saadana at yahoo.com (HamdiSaadana) Date: Thu, 21 Feb 2019 06:53:46 -0700 (MST) Subject: [vtkusers] Urgent need for VTK expert Message-ID: <1550757226823-0.post@n5.nabble.com> Dear allDoes any of you know a VTK C++ expert that I can hire as a consultant?We have to deliver at the short term a software using the library and need assistance from someone who know it very well.Practical organisation is to be discussed. Our need is someone knowing very well the library to whom we can explain step by step what we need, and who could guide us finding the relevant code within VTK library.Thank you in advance for your help.Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Feb 21 09:20:15 2019 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 21 Feb 2019 09:20:15 -0500 Subject: [vtkusers] Urgent need for VTK expert In-Reply-To: <1550757226823-0.post@n5.nabble.com> References: <1550757226823-0.post@n5.nabble.com> Message-ID: Hi Hamdi, kitware offers a range of consulting services for VTK and the rest of the projects that we run. https://www.kitware.com/what-we-offer/#support cheers David E DeMarle Kitware, Inc. Principal Engineer On Thu, Feb 21, 2019 at 8:58 AM HamdiSaadana via vtkusers wrote: > Dear all Does any of you know a VTK C++ expert that I can hire as a > consultant? We have to deliver at the short term a software using the > library and need assistance from someone who know it very well. Practical > organisation is to be discussed. Our need is someone knowing very well the > library to whom we can explain step by step what we need, and who could > guide us finding the relevant code within VTK library. Thank you in advance > for your help. Regards > ------------------------------ > 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 mjordan at live.at Fri Feb 22 05:46:14 2019 From: mjordan at live.at (M. Jordan) Date: Fri, 22 Feb 2019 10:46:14 +0000 Subject: [vtkusers] Using vtkProbeFilter to sample values of NIFTI volume onto surface Message-ID: Hi, i have a fMRI NIFTI volume whereby each voxel value corresponds to a statistical value. I am using the vtkProbeFilter to show the activation on the corresponding brain surface. The results looks pretty good but I would like to understand what is really going on when using the vtkProbeFilter. Assumed that I specify a tolerance value of 10.0, how the filter determines the corresponding scalar value for a certain surface vertex? Is the filter simply assigning the value of the closest voxel to the vertex? Or is the filter averaging all values within the specified tolerance? Thank you! Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Feb 22 13:08:33 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 22 Feb 2019 11:08:33 -0700 Subject: [vtkusers] Java multi-thread and model Observer In-Reply-To: References: Message-ID: 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 anastasiya.ruzhanskaya at frtk.ru Sat Feb 23 07:04:47 2019 From: anastasiya.ruzhanskaya at frtk.ru (Anastasiya Ruzhanskaya) Date: Sat, 23 Feb 2019 15:04:47 +0300 Subject: [vtkusers] resetCameraClippingRange does not take into account all actors Message-ID: Hello! I have some actors and during my work, I want to focus on each of them. I use resetCamera with the corresponding bounding box for this. After being focused, I want to rotate objects (actors). When I rotate, I have a problem, that for some angles my object disappear. I think this is a clipping problem and I use resetCameraClippingRange. But nothing changes. I am totally sure I provided my renderer with all actors, so this function should take into account all actors on the scene and make them all visible for any rotation angle. Probably there are some tricks in order to make this function work correctly? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjordan080013 at gmail.com Sat Feb 23 18:59:40 2019 From: mjordan080013 at gmail.com (Michael Jordan) Date: Sun, 24 Feb 2019 00:59:40 +0100 Subject: [vtkusers] Using vtkProbeFilter to sample values of NIFTI volume onto surface Message-ID: Hi, i have a fMRI NIFTI volume whereby each voxel value corresponds to a statistical value indicating the activation. I am using the vtkProbeFilter to show the activation on the corresponding brain surface. The results looks pretty good but I would like to understand what is really going on when using the vtkProbeFilter. Assumed that I specify a tolerance value of 10.0 <+49100>, how the filter determines the corresponding scalar value for a certain surface vertex? Is the filter simply assigning the value of the closest voxel to the vertex? Or is the filter averaging all values within the specified tolerance? Thank you! Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sweet.factory_92 at hotmail.com Mon Feb 25 06:30:55 2019 From: sweet.factory_92 at hotmail.com (Anna1994) Date: Mon, 25 Feb 2019 04:30:55 -0700 (MST) Subject: [vtkusers] The program has unexpectedly finished when using vtkBoxWidget Message-ID: <1551094255614-0.post@n5.nabble.com> Any help is appreciated -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sujin.philip at kitware.com Mon Feb 25 09:24:19 2019 From: sujin.philip at kitware.com (Sujin Philip) Date: Mon, 25 Feb 2019 09:24:19 -0500 Subject: [vtkusers] Using vtkProbeFilter to sample values of NIFTI volume onto surface In-Reply-To: References: Message-ID: Hi Michael, In this case, for each vertex in the surface mesh, the filter finds the voxel within which the vertex falls and interpolates the points values of the 8 points of the voxel on to the vertex. The tolerance is used for dealing with floating point errors. It specifies the tolerance to use when a vertex is near the boundary of a cell to determine if it should be considered to be inside the cell. Thanks Sujin On Sat, Feb 23, 2019 at 6:59 PM Michael Jordan wrote: > Hi, > > i have a fMRI NIFTI volume whereby each voxel value corresponds to a > statistical value indicating the activation. I am using the vtkProbeFilter > to show the activation on the > corresponding brain surface. The results looks pretty good but I would > like to understand what is really going on when using the vtkProbeFilter. > > Assumed that I specify a tolerance value of 10.0 <+49100>, how the filter > determines the corresponding scalar value for a certain surface vertex? > Is the filter simply assigning the value of the closest voxel to the > vertex? Or is the filter averaging all values within the specified > tolerance? > > Thank you! > > Regards, Michael > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 jayavardhanravi at outlook.com Mon Feb 25 11:03:14 2019 From: jayavardhanravi at outlook.com (Jay) Date: Mon, 25 Feb 2019 09:03:14 -0700 (MST) Subject: [vtkusers] How to add multiple viewports to vtkGenericOpenGLRenderWindow Message-ID: <1551110594570-0.post@n5.nabble.com> I had tried to add multiple view ports to vtkRenderWindow and was able to get the various viewports displayed as expected. * vtkSmartPointer testRendererA = vtkSmartPointer::New(); vtkSmartPointer testRendererB = vtkSmartPointer::New(); vtkSmartPointer testWindow = vtkSmartPointer::New(); testRendererA->AddActor(customGraphics_->overtube_model); testRendererB->AddActor(customGraphics_->overtube_model); testWindow->AddRenderer(testRendererA); testRendererA->SetViewport(0,0,0.5,1); testWindow->AddRenderer(testRendererB); testRendererB->SetViewport(0.5,0,1,1); testWindow->Render();* I tried to do the same for adding the viewports to the vtkGenericOpenGLRenderWindow but was only able to display only one view port and other viewport is blank. The last added renderer was displayed and the previously added renderers were not displayed. In the below pseudo code testRendererB was displayed & testRendererA was not displayed * vtkSmartPointer testRendererA = vtkSmartPointer::New(); vtkSmartPointer testRendererB = vtkSmartPointer::New(); vtkSmartPointer testWindow = vtkSmartPointer::New(); testRendererA->AddActor(customGraphics_->overtube_model); testRendererB->AddActor(customGraphics_->overtube_model); testWindow->AddRenderer(testRendererA); testRendererA->SetViewport(0,0,0.5,1); testWindow->AddRenderer(testRendererB); testRendererB->SetViewport(0.5,0,1,1); testWindow->Render();* Can we add multiple viewports to vtkGenericOpenGLRenderWindow ? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From esmeralda.ruiz at alma3d.com Tue Feb 26 04:18:22 2019 From: esmeralda.ruiz at alma3d.com (zandarina) Date: Tue, 26 Feb 2019 02:18:22 -0700 (MST) Subject: [vtkusers] big volume loading Message-ID: <1551172702727-0.post@n5.nabble.com> Hello all, I am writing because i am implementing a 3d viewer from dicom series. The 3d viewer visualizes correctly but when i zoom in, and i rotate the volume, it goes a bit slow to show the image. There is a way to smooth, the movement of the 3d volume. As it takes a while to be rendered whw i rotate it. And i would like a more smooth movement. Thank you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From loiseau_nicolas at hotmail.fr Tue Feb 26 08:13:48 2019 From: loiseau_nicolas at hotmail.fr (Nicolas) Date: Tue, 26 Feb 2019 06:13:48 -0700 (MST) Subject: [vtkusers] Label from mhd/raw and stl files Message-ID: <1551186828802-0.post@n5.nabble.com> hello to all viewer, I have one mhd, raw file and 2 stl files, I want to make label for deep learning Cnn. For that I want to color my raw file with polyData that I have with my 2 STL files. I want to do this on Python and I don't find any ideas on web. Any help is appreciated, Best Regards. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sid.murthy at gmail.com Tue Feb 26 12:14:35 2019 From: sid.murthy at gmail.com (Sid Murthy) Date: Tue, 26 Feb 2019 10:14:35 -0700 Subject: [vtkusers] Unicode text In-Reply-To: References: Message-ID: Hi - I was wondering if this is still the case for the latest VTK version where unicode characters for text display are not supported by default? Currently we use Arial Unicode MS - which works fine - but are there freely licensed versions that would work? On Thu, Aug 25, 2016 at 9:33 AM David Lonie wrote: > On Thu, Aug 25, 2016 at 7:51 AM, Rustem Khabetdinov > wrote: > > Hello. > > > > Is there any possibility to use unicode chars?(without using vtk2DActor) > > I'm not sure what you mean by vtk2DActor, but it is possible to render > unicode text by configuring the vtkTextProperty's FontFamily to > VTK_FONT_FILE and setting FontFile to a font file that supports the > character you wish to use. The default fonts in VTK do not support > much if any unicode, so you'll need to provide a font file. > > This approach will work for vtkTextActor, vtkTextActor3D, and > vtkTextMapper. > > Example: > https://github.com/Kitware/VTK/blob/master/Rendering/FreeType/Testing/Cxx/TestFreeTypeTextMapperNoMath.cxx#L148-L159 > > HTH, > Dave > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihouxing0710 at gmail.com Tue Feb 26 21:20:06 2019 From: lihouxing0710 at gmail.com (Jounly) Date: Tue, 26 Feb 2019 19:20:06 -0700 (MST) Subject: [vtkusers] how to set gradient background when using vtk.js? Message-ID: <1551234006236-0.post@n5.nabble.com> Hi, As the title, how can i set a gradient background when using vtk.js? I use the way below to set the background color, but it's not gradient. Could anyone give me a hint on this? / const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({background:[0,0,0]});/ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Tue Feb 26 23:05:43 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 26 Feb 2019 21:05:43 -0700 Subject: [vtkusers] how to set gradient background when using vtk.js? In-Reply-To: <1551234006236-0.post@n5.nabble.com> References: <1551234006236-0.post@n5.nabble.com> Message-ID: you need to do it in html while setting the bg in vtk.js with an opacity of 0 like [0,0,0,0] On Tue, Feb 26, 2019 at 7:24 PM Jounly wrote: > Hi, > As the title, how can i set a gradient background when using vtk.js? > I use the way below to set the background color, but it's not gradient. > Could anyone give me a hint on this? > / > const fullScreenRenderer = > vtkFullScreenRenderWindow.newInstance({background:[0,0,0]});/ > > > > > -- > 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 s.turner17 at imperial.ac.uk Wed Feb 27 05:38:38 2019 From: s.turner17 at imperial.ac.uk (Turner, Shruti) Date: Wed, 27 Feb 2019 10:38:38 +0000 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS Message-ID: Hello, I am trying to render an STL file within a web application using VTK.js and trying to get some help with adding colours to it and interpolation. I have added my code below which currently does the following: * Reads in and Renders the STL file * Adds colour to points if the vertex index is in a pressure_sensors array. I have the following 2 questions: 1. Is this the best way to add colours to the model? 2. How best to interpolate between the given data points to show a colourmap across the surface? I have tried to look through the VTK.js website, however I am struggling to make any headway with how to achieve more than I already have done. Thanks, Shruti import 'vtk.js/Sources/favicon'; import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; import vtkSTLReader from 'vtk.js/Sources/IO/Geometry/STLReader'; import vtkOpenGLRenderWindow from 'vtk.js/Sources/Rendering/OpenGL/RenderWindow'; import vtkRenderWindow from 'vtk.js/Sources/Rendering/Core/RenderWindow'; import vtkRenderWindowInteractor from 'vtk.js/Sources/Rendering/Core/RenderWindowInteractor'; import vtkRenderer from 'vtk.js/Sources/Rendering/Core/Renderer'; import vtkInteractorStyleTrackballCamera from 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera'; import axios from 'axios' import vtkLookupTable from 'vtk.js/Sources/Common/Core/LookupTable'; //---------------------------------------------------------------------------- // Example code // ---------------------------------------------------------------------------- const reader = vtkSTLReader.newInstance({ interpolateScalarsBeforeMapping: true }); const 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] // ---------------------------------------------------------------------------- function update() { const colors = { tupleValues: [], insertNextTupleValue: (color) => { for (let i = 0; i < color.length; i++) { colors.tupleValues.push(color[i]); } }, getNumberOfComponents: () => { return 3; }, getDataType: () => { return 'array'; }, getNumberOfTuples: () => { return colors.tupleValues.length / colors.getNumberOfComponents(); }, getData: () => { return colors.tupleValues; } }; const mapper = vtkMapper.newInstance(); const actor = vtkActor.newInstance(); const lookup = vtkLookupTable.newInstance(); lookup.setNumberOfColors(1024), lookup.setRange(0, 1); lookup.build(); mapper.setLookupTable(lookup); mapper.setInterpolateScalarsBeforeMapping(true); mapper.setUseLookupTableScalarRange(lookup); for (let i = 0; i < reader.getOutputData().getPoints().getNumberOfPoints(); i = i + 1) { const color = []; if (sensor_locations.includes(i)) { var x = Math.random(); color[0] = x color[1] = x color[2] = x } else { color[0] = null color[1] = null color[2] = null } colors.insertNextTupleValue(color); } reader.getOutputData().getPointData().setScalars(colors); mapper.setInputConnection(reader.getOutputPort()); actor.setMapper(mapper); // ---------------------------------------------------------------------------- // Standard rendering code setup // ---------------------------------------------------------------------------- const renderWindow = vtkRenderWindow.newInstance(); const renderer = vtkRenderer.newInstance({ background: [0.2, 0.3, 0.4] }); renderWindow.addRenderer(renderer); // ---------------------------------------------------------------------------- // Add the actor to the renderer and set the camera based on it // ---------------------------------------------------------------------------- renderer.addActor(actor); renderer.resetCamera(); // ---------------------------------------------------------------------------- // Use OpenGL as the backend to view the all this // ---------------------------------------------------------------------------- const openglRenderWindow = vtkOpenGLRenderWindow.newInstance(); renderWindow.addView(openglRenderWindow); // ---------------------------------------------------------------------------- // Create a div section to put this into // ---------------------------------------------------------------------------- const container = document.createElement('div'); container.style.height = "600px"; container.style.width = "600px" document.querySelector('body').appendChild(container); openglRenderWindow.setContainer(container); // ---------------------------------------------------------------------------- // Capture size of the container and set it to the renderWindow // ---------------------------------------------------------------------------- const { width, height } = container.getBoundingClientRect(); openglRenderWindow.setSize(width, height); // ---------------------------------------------------------------------------- // Setup an interactor to handle mouse events // ---------------------------------------------------------------------------- const interactor = vtkRenderWindowInteractor.newInstance(); interactor.setView(openglRenderWindow); interactor.initialize(); interactor.bindEvents(container); // ---------------------------------------------------------------------------- // Setup interactor style to use // ---------------------------------------------------------------------------- interactor.setInteractorStyle(vtkInteractorStyleTrackballCamera.newInstance()); // render(); } reader.setUrl(`./newpivot.stl`, { binary: true }).then(update); -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelmuerner at gmx.ch Wed Feb 27 08:31:26 2019 From: michelmuerner at gmx.ch (=?UTF-8?Q?=22Michel_M=C3=BCrner=22?=) Date: Wed, 27 Feb 2019 14:31:26 +0100 Subject: [vtkusers] Color gradient on vtkLine Message-ID: An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Wed Feb 27 08:54:55 2019 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Wed, 27 Feb 2019 13:54:55 +0000 (UTC) Subject: [vtkusers] Unicode text In-Reply-To: References: Message-ID: <1483270479.9924090.1551275695199@mail.yahoo.com> I have no any problems with Unicode in QVTKWidget, but it not works (for me) with vtkOpenGLWidget and vtkOpenGLNativeWidget? From: Sid Murthy To: David Lonie Cc: Rustem Khabetdinov ; "vtkusers at vtk.org" Sent: Tuesday, February 26, 2019 7:15 PM Subject: Re: [vtkusers] Unicode text Hi - I was wondering if this is still the case for the latest VTK version where unicode characters for text display are not supported by default? Currently we use Arial Unicode MS - which works fine - but are there freely licensed versions that would work? On Thu, Aug 25, 2016 at 9:33 AM David Lonie wrote: On Thu, Aug 25, 2016 at 7:51 AM, Rustem Khabetdinov wrote: > Hello. > > Is there any possibility to use unicode chars?(without using vtk2DActor) I'm not sure what you mean by vtk2DActor, but it is possible to render unicode text by configuring the vtkTextProperty's FontFamily to VTK_FONT_FILE and setting FontFile to a font file that supports the character you wish to use. The default fonts in VTK do not support much if any unicode, so you'll need to provide a font file. This approach will work for vtkTextActor, vtkTextActor3D, and vtkTextMapper. Example: https://github.com/Kitware/VTK/blob/master/Rendering/FreeType/Testing/Cxx/TestFreeTypeTextMapperNoMath.cxx#L148-L159 HTH, Dave _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From weiherer.maximilian at gmx.de Wed Feb 27 09:48:33 2019 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Wed, 27 Feb 2019 15:48:33 +0100 Subject: [vtkusers] Tangent through a given point on a surface Message-ID: <00e001d4ceab$841b5420$8c51fc60$@gmx.de> Hi all, how can I calculate a tangent (in 3d usually a plane) through a given point on a surface using VTK? I already tried the following: - Use an implicit dataset to transform polydata to an implicit surface representation and then - calculate the gradient at the given point using the method FunctionGradient(.). However, the gradient I received seems to be wrong (which is (0, 0, 1)). Any help would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Feb 27 12:15:51 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 27 Feb 2019 10:15:51 -0700 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS In-Reply-To: References: Message-ID: You should probably use discourse as it will allow better formatting of your code. https://discourse.vtk.org/c/web But they are several issue in what you are doing: 1) You should not modify the output of a filter and connect to the port for rendering 2) Your colors should be an instance of vtkDataArray [...] const dataset = reader.getOutputData(); const nbPoints = dataset.getNumberOfPoints(); const values = new Float32Array(nbPoints); for (let i = 0; i < nbPoints; i++) { values[i] = Math.random(); } const colors = vtkDataArray.newInstance({ name: 'fieldName', values }); dataset.getPointData().setScalars(colors); mapper.setInputData(dataset); [...] On Wed, Feb 27, 2019 at 4:10 AM Turner, Shruti wrote: > Hello, > > I am trying to render an STL file within a web application using VTK.js > and trying to get some help with adding colours to it and interpolation. > > I have added my code below which currently does the following: > > ? Reads in and Renders the STL file > > ? Adds colour to points if the vertex index is in a > pressure_sensors array. > > > > I have the following 2 questions: > > 1. Is this the best way to add colours to the model? > > 2. How best to interpolate between the given data points to show a > colourmap across the surface? > > > > I have tried to look through the VTK.js website, however I am struggling > to make any headway with how to achieve more than I already have done. > > Thanks, > > Shruti > > import 'vtk.js/Sources/favicon'; > > > > import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; > > import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; > > import vtkSTLReader from 'vtk.js/Sources/IO/Geometry/STLReader'; > > > > import vtkOpenGLRenderWindow from > 'vtk.js/Sources/Rendering/OpenGL/RenderWindow'; > > import vtkRenderWindow from 'vtk.js/Sources/Rendering/Core/RenderWindow'; > > import vtkRenderWindowInteractor from > 'vtk.js/Sources/Rendering/Core/RenderWindowInteractor'; > > import vtkRenderer from 'vtk.js/Sources/Rendering/Core/Renderer'; > > import vtkInteractorStyleTrackballCamera from > 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera'; > > import axios from 'axios' > > import vtkLookupTable from 'vtk.js/Sources/Common/Core/LookupTable'; > > > > > //---------------------------------------------------------------------------- > > > > // Example code > > // > ---------------------------------------------------------------------------- > > > > const reader = vtkSTLReader.newInstance({ > interpolateScalarsBeforeMapping: true }); > > const 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] > > > > // > ---------------------------------------------------------------------------- > > > > function update() { > > > > const colors = { > > tupleValues: [], > > insertNextTupleValue: (color) => { > > for (let i = 0; i < color.length; i++) { > > colors.tupleValues.push(color[i]); > > } > > }, > > getNumberOfComponents: () => { > > return 3; > > }, > > getDataType: () => { > > return 'array'; > > }, > > getNumberOfTuples: () => { > > return colors.tupleValues.length / colors.getNumberOfComponents(); > > }, > > getData: () => { > > return colors.tupleValues; > > } > > }; > > > > const mapper = vtkMapper.newInstance(); > > const actor = vtkActor.newInstance(); > > > > const lookup = vtkLookupTable.newInstance(); > > lookup.setNumberOfColors(1024), > > lookup.setRange(0, 1); > > lookup.build(); > > > > mapper.setLookupTable(lookup); > > mapper.setInterpolateScalarsBeforeMapping(true); > > mapper.setUseLookupTableScalarRange(lookup); > > > > for (let i = 0; i < > reader.getOutputData().getPoints().getNumberOfPoints(); i = i + 1) { > > const color = []; > > > > if (sensor_locations.includes(i)) { > > var x = Math.random(); > > color[0] = x > > color[1] = x > > color[2] = x > > } > > else { > > color[0] = null > > color[1] = null > > color[2] = null > > } > > colors.insertNextTupleValue(color); > > } > > > > reader.getOutputData().getPointData().setScalars(colors); > > > > mapper.setInputConnection(reader.getOutputPort()); > > actor.setMapper(mapper); > > > > > > // > ---------------------------------------------------------------------------- > > // Standard rendering code setup > > // > ---------------------------------------------------------------------------- > > > > const renderWindow = vtkRenderWindow.newInstance(); > > const renderer = vtkRenderer.newInstance({ background: [0.2, 0.3, 0.4] > }); > > renderWindow.addRenderer(renderer); > > > > // > ---------------------------------------------------------------------------- > > // Add the actor to the renderer and set the camera based on it > > // > ---------------------------------------------------------------------------- > > > > renderer.addActor(actor); > > renderer.resetCamera(); > > > > // > ---------------------------------------------------------------------------- > > // Use OpenGL as the backend to view the all this > > // > ---------------------------------------------------------------------------- > > > > const openglRenderWindow = vtkOpenGLRenderWindow.newInstance(); > > renderWindow.addView(openglRenderWindow); > > > > // > ---------------------------------------------------------------------------- > > // Create a div section to put this into > > // > ---------------------------------------------------------------------------- > > > > const container = document.createElement('div'); > > container.style.height = "600px"; > > container.style.width = "600px" > > document.querySelector('body').appendChild(container); > > openglRenderWindow.setContainer(container); > > > > // > ---------------------------------------------------------------------------- > > // Capture size of the container and set it to the renderWindow > > // > ---------------------------------------------------------------------------- > > > > const { width, height } = container.getBoundingClientRect(); > > openglRenderWindow.setSize(width, height); > > > > > > // > ---------------------------------------------------------------------------- > > // Setup an interactor to handle mouse events > > // > ---------------------------------------------------------------------------- > > > > const interactor = vtkRenderWindowInteractor.newInstance(); > > interactor.setView(openglRenderWindow); > > interactor.initialize(); > > interactor.bindEvents(container); > > > > // > ---------------------------------------------------------------------------- > > // Setup interactor style to use > > // > ---------------------------------------------------------------------------- > > > > > interactor.setInteractorStyle(vtkInteractorStyleTrackballCamera.newInstance()); > > // render(); > > } > > > > reader.setUrl(`./newpivot.stl`, { binary: true }).then(update); > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 s.turner17 at imperial.ac.uk Wed Feb 27 15:16:26 2019 From: s.turner17 at imperial.ac.uk (Turner, Shruti) Date: Wed, 27 Feb 2019 20:16:26 +0000 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS In-Reply-To: References: Message-ID: <95D22503-E324-4B4D-9724-DE5E52E67A7C@ic.ac.uk> Thank you for your response, it worked perfectly with getting the colours onto the model. Would you be able to give any advice on interpolating? We have a model with about 43000 polys, of which we will add scalars, representing pressure, to some of them. With what I have tried to do I have ended up with a model all in red with the ~150 points I added colour to having colour. When inspecting the scalar this is because I have 0 in all values not given a value, which makes sense. However, I?m not sure how best to interpolate between them as it is a 3D model represented on a 1d array. Thanks, Shruti On 27 Feb 2019, at 17:15, Sebastien Jourdain > wrote: You should probably use discourse as it will allow better formatting of your code. https://discourse.vtk.org/c/web But they are several issue in what you are doing: 1) You should not modify the output of a filter and connect to the port for rendering 2) Your colors should be an instance of vtkDataArray [...] const dataset = reader.getOutputData(); const nbPoints = dataset.getNumberOfPoints(); const values = new Float32Array(nbPoints); for (let i = 0; i < nbPoints; i++) { values[i] = Math.random(); } const colors = vtkDataArray.newInstance({ name: 'fieldName', values }); dataset.getPointData().setScalars(colors); mapper.setInputData(dataset); [...] On Wed, Feb 27, 2019 at 4:10 AM Turner, Shruti > wrote: Hello, I am trying to render an STL file within a web application using VTK.js and trying to get some help with adding colours to it and interpolation. I have added my code below which currently does the following: ? Reads in and Renders the STL file ? Adds colour to points if the vertex index is in a pressure_sensors array. I have the following 2 questions: 1. Is this the best way to add colours to the model? 2. How best to interpolate between the given data points to show a colourmap across the surface? I have tried to look through the VTK.js website, however I am struggling to make any headway with how to achieve more than I already have done. Thanks, Shruti import 'vtk.js/Sources/favicon'; import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; import vtkSTLReader from 'vtk.js/Sources/IO/Geometry/STLReader'; import vtkOpenGLRenderWindow from 'vtk.js/Sources/Rendering/OpenGL/RenderWindow'; import vtkRenderWindow from 'vtk.js/Sources/Rendering/Core/RenderWindow'; import vtkRenderWindowInteractor from 'vtk.js/Sources/Rendering/Core/RenderWindowInteractor'; import vtkRenderer from 'vtk.js/Sources/Rendering/Core/Renderer'; import vtkInteractorStyleTrackballCamera from 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera'; import axios from 'axios' import vtkLookupTable from 'vtk.js/Sources/Common/Core/LookupTable'; //---------------------------------------------------------------------------- // Example code // ---------------------------------------------------------------------------- const reader = vtkSTLReader.newInstance({ interpolateScalarsBeforeMapping: true }); const 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] // ---------------------------------------------------------------------------- function update() { const colors = { tupleValues: [], insertNextTupleValue: (color) => { for (let i = 0; i < color.length; i++) { colors.tupleValues.push(color[i]); } }, getNumberOfComponents: () => { return 3; }, getDataType: () => { return 'array'; }, getNumberOfTuples: () => { return colors.tupleValues.length / colors.getNumberOfComponents(); }, getData: () => { return colors.tupleValues; } }; const mapper = vtkMapper.newInstance(); const actor = vtkActor.newInstance(); const lookup = vtkLookupTable.newInstance(); lookup.setNumberOfColors(1024), lookup.setRange(0, 1); lookup.build(); mapper.setLookupTable(lookup); mapper.setInterpolateScalarsBeforeMapping(true); mapper.setUseLookupTableScalarRange(lookup); for (let i = 0; i < reader.getOutputData().getPoints().getNumberOfPoints(); i = i + 1) { const color = []; if (sensor_locations.includes(i)) { var x = Math.random(); color[0] = x color[1] = x color[2] = x } else { color[0] = null color[1] = null color[2] = null } colors.insertNextTupleValue(color); } reader.getOutputData().getPointData().setScalars(colors); mapper.setInputConnection(reader.getOutputPort()); actor.setMapper(mapper); // ---------------------------------------------------------------------------- // Standard rendering code setup // ---------------------------------------------------------------------------- const renderWindow = vtkRenderWindow.newInstance(); const renderer = vtkRenderer.newInstance({ background: [0.2, 0.3, 0.4] }); renderWindow.addRenderer(renderer); // ---------------------------------------------------------------------------- // Add the actor to the renderer and set the camera based on it // ---------------------------------------------------------------------------- renderer.addActor(actor); renderer.resetCamera(); // ---------------------------------------------------------------------------- // Use OpenGL as the backend to view the all this // ---------------------------------------------------------------------------- const openglRenderWindow = vtkOpenGLRenderWindow.newInstance(); renderWindow.addView(openglRenderWindow); // ---------------------------------------------------------------------------- // Create a div section to put this into // ---------------------------------------------------------------------------- const container = document.createElement('div'); container.style.height = "600px"; container.style.width = "600px" document.querySelector('body').appendChild(container); openglRenderWindow.setContainer(container); // ---------------------------------------------------------------------------- // Capture size of the container and set it to the renderWindow // ---------------------------------------------------------------------------- const { width, height } = container.getBoundingClientRect(); openglRenderWindow.setSize(width, height); // ---------------------------------------------------------------------------- // Setup an interactor to handle mouse events // ---------------------------------------------------------------------------- const interactor = vtkRenderWindowInteractor.newInstance(); interactor.setView(openglRenderWindow); interactor.initialize(); interactor.bindEvents(container); // ---------------------------------------------------------------------------- // Setup interactor style to use // ---------------------------------------------------------------------------- interactor.setInteractorStyle(vtkInteractorStyleTrackballCamera.newInstance()); // render(); } reader.setUrl(`./newpivot.stl`, { binary: true }).then(update); _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 Wed Feb 27 16:08:30 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 27 Feb 2019 14:08:30 -0700 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS In-Reply-To: <95D22503-E324-4B4D-9724-DE5E52E67A7C@ic.ac.uk> References: <95D22503-E324-4B4D-9724-DE5E52E67A7C@ic.ac.uk> Message-ID: The interpolation should happen. But no picture == no idea of what you are talking about. On Wed, Feb 27, 2019 at 1:16 PM Turner, Shruti wrote: > Thank you for your response, it worked perfectly with getting the colours > onto the model. > > Would you be able to give any advice on interpolating? > > We have a model with about 43000 polys, of which we will add scalars, > representing pressure, to some of them. With what I have tried to do I have > ended up with a model all in red with the ~150 points I added colour to > having colour. When inspecting the scalar this is because I have 0 in all > values not given a value, which makes sense. > > However, I?m not sure how best to interpolate between them as it is a 3D > model represented on a 1d array. > > Thanks, > Shruti > > On 27 Feb 2019, at 17:15, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > > You should probably use discourse as it will allow better formatting of > your code. > https://discourse.vtk.org/c/web > > But they are several issue in what you are doing: > 1) You should not modify the output of a filter and connect to the port > for rendering > 2) Your colors should be an instance of vtkDataArray > > > [...] > const dataset = reader.getOutputData(); > const nbPoints = dataset.getNumberOfPoints(); > > const values = new Float32Array(nbPoints); > for (let i = 0; i < nbPoints; i++) { > values[i] = Math.random(); > } > const colors = vtkDataArray.newInstance({ name: 'fieldName', values }); > > dataset.getPointData().setScalars(colors); > > mapper.setInputData(dataset); > [...] > > > On Wed, Feb 27, 2019 at 4:10 AM Turner, Shruti > wrote: > >> Hello, >> >> I am trying to render an STL file within a web application using VTK.js >> and trying to get some help with adding colours to it and interpolation. >> >> I have added my code below which currently does the following: >> >> ? Reads in and Renders the STL file >> >> ? Adds colour to points if the vertex index is in a >> pressure_sensors array. >> >> >> >> I have the following 2 questions: >> >> 1. Is this the best way to add colours to the model? >> >> 2. How best to interpolate between the given data points to show a >> colourmap across the surface? >> >> >> >> I have tried to look through the VTK.js website, however I am struggling >> to make any headway with how to achieve more than I already have done. >> >> Thanks, >> >> Shruti >> >> import 'vtk.js/Sources/favicon'; >> >> >> >> import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; >> >> import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; >> >> import vtkSTLReader from 'vtk.js/Sources/IO/Geometry/STLReader'; >> >> >> >> import vtkOpenGLRenderWindow from >> 'vtk.js/Sources/Rendering/OpenGL/RenderWindow'; >> >> import vtkRenderWindow from 'vtk.js/Sources/Rendering/Core/RenderWindow'; >> >> import vtkRenderWindowInteractor from >> 'vtk.js/Sources/Rendering/Core/RenderWindowInteractor'; >> >> import vtkRenderer from 'vtk.js/Sources/Rendering/Core/Renderer'; >> >> import vtkInteractorStyleTrackballCamera from >> 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera'; >> >> import axios from 'axios' >> >> import vtkLookupTable from 'vtk.js/Sources/Common/Core/LookupTable'; >> >> >> >> >> //---------------------------------------------------------------------------- >> >> >> >> // Example code >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> const reader = vtkSTLReader.newInstance({ >> interpolateScalarsBeforeMapping: true }); >> >> const 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] >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> function update() { >> >> >> >> const colors = { >> >> tupleValues: [], >> >> insertNextTupleValue: (color) => { >> >> for (let i = 0; i < color.length; i++) { >> >> colors.tupleValues.push(color[i]); >> >> } >> >> }, >> >> getNumberOfComponents: () => { >> >> return 3; >> >> }, >> >> getDataType: () => { >> >> return 'array'; >> >> }, >> >> getNumberOfTuples: () => { >> >> return colors.tupleValues.length / colors.getNumberOfComponents(); >> >> }, >> >> getData: () => { >> >> return colors.tupleValues; >> >> } >> >> }; >> >> >> >> const mapper = vtkMapper.newInstance(); >> >> const actor = vtkActor.newInstance(); >> >> >> >> const lookup = vtkLookupTable.newInstance(); >> >> lookup.setNumberOfColors(1024), >> >> lookup.setRange(0, 1); >> >> lookup.build(); >> >> >> >> mapper.setLookupTable(lookup); >> >> mapper.setInterpolateScalarsBeforeMapping(true); >> >> mapper.setUseLookupTableScalarRange(lookup); >> >> >> >> for (let i = 0; i < >> reader.getOutputData().getPoints().getNumberOfPoints(); i = i + 1) { >> >> const color = []; >> >> >> >> if (sensor_locations.includes(i)) { >> >> var x = Math.random(); >> >> color[0] = x >> >> color[1] = x >> >> color[2] = x >> >> } >> >> else { >> >> color[0] = null >> >> color[1] = null >> >> color[2] = null >> >> } >> >> colors.insertNextTupleValue(color); >> >> } >> >> >> >> reader.getOutputData().getPointData().setScalars(colors); >> >> >> >> mapper.setInputConnection(reader.getOutputPort()); >> >> actor.setMapper(mapper); >> >> >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Standard rendering code setup >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> const renderWindow = vtkRenderWindow.newInstance(); >> >> const renderer = vtkRenderer.newInstance({ background: [0.2, 0.3, 0.4] >> }); >> >> renderWindow.addRenderer(renderer); >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Add the actor to the renderer and set the camera based on it >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> renderer.addActor(actor); >> >> renderer.resetCamera(); >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Use OpenGL as the backend to view the all this >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> const openglRenderWindow = vtkOpenGLRenderWindow.newInstance(); >> >> renderWindow.addView(openglRenderWindow); >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Create a div section to put this into >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> const container = document.createElement('div'); >> >> container.style.height = "600px"; >> >> container.style.width = "600px" >> >> document.querySelector('body').appendChild(container); >> >> openglRenderWindow.setContainer(container); >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Capture size of the container and set it to the renderWindow >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> const { width, height } = container.getBoundingClientRect(); >> >> openglRenderWindow.setSize(width, height); >> >> >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Setup an interactor to handle mouse events >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> const interactor = vtkRenderWindowInteractor.newInstance(); >> >> interactor.setView(openglRenderWindow); >> >> interactor.initialize(); >> >> interactor.bindEvents(container); >> >> >> >> // >> ---------------------------------------------------------------------------- >> >> // Setup interactor style to use >> >> // >> ---------------------------------------------------------------------------- >> >> >> >> >> interactor.setInteractorStyle(vtkInteractorStyleTrackballCamera.newInstance()); >> >> // render(); >> >> } >> >> >> >> reader.setUrl(`./newpivot.stl`, { binary: true }).then(update); >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 s.turner17 at imperial.ac.uk Wed Feb 27 16:25:58 2019 From: s.turner17 at imperial.ac.uk (Turner, Shruti) Date: Wed, 27 Feb 2019 21:25:58 +0000 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS In-Reply-To: References: <95D22503-E324-4B4D-9724-DE5E52E67A7C@ic.ac.uk> Message-ID: <1CBFD5E3-0314-4810-AFAF-EDAB518E93A0@ic.ac.uk> Very good point. Apologies. Attached is the image and below is the code snippet. As all the identified points are set to the same scalar, I?m expecting the whole model to be that great colour if it is interpolating. Is that correct? const mapper = vtkMapper.newInstance(); const actor = vtkActor.newInstance(); const lookup = vtkLookupTable.newInstance(); lookup.setNumberOfColors(1024), lookup.setRange(0, 1); lookup.build(); mapper.setLookupTable(lookup); mapper.setInterpolateScalarsBeforeMapping(true); mapper.setUseLookupTableScalarRange(lookup); const dataset = reader.getOutputData(); const nbPoints = dataset.getPoints().getNumberOfPoints(); const values = new Float32Array(nbPoints); for (let i = 0; i < nbPoints; i++) { values[i] = sensor_locations.includes(i) ? 1 : null } const colors = vtkDataArray.newInstance({ name: 'fieldName', values }); reader.getOutputData().getPointData().setScalars(colors); mapper.setInputConnection(reader.getOutputPort()); actor.setMapper(mapper); [cid:EB1AA0E9-12C2-4101-817C-F1EEF0657915 at home] On 27 Feb 2019, at 21:08, Sebastien Jourdain > wrote: The interpolation should happen. But no picture == no idea of what you are talking about. On Wed, Feb 27, 2019 at 1:16 PM Turner, Shruti > wrote: Thank you for your response, it worked perfectly with getting the colours onto the model. Would you be able to give any advice on interpolating? We have a model with about 43000 polys, of which we will add scalars, representing pressure, to some of them. With what I have tried to do I have ended up with a model all in red with the ~150 points I added colour to having colour. When inspecting the scalar this is because I have 0 in all values not given a value, which makes sense. However, I?m not sure how best to interpolate between them as it is a 3D model represented on a 1d array. Thanks, Shruti On 27 Feb 2019, at 17:15, Sebastien Jourdain > wrote: You should probably use discourse as it will allow better formatting of your code. https://discourse.vtk.org/c/web But they are several issue in what you are doing: 1) You should not modify the output of a filter and connect to the port for rendering 2) Your colors should be an instance of vtkDataArray [...] const dataset = reader.getOutputData(); const nbPoints = dataset.getNumberOfPoints(); const values = new Float32Array(nbPoints); for (let i = 0; i < nbPoints; i++) { values[i] = Math.random(); } const colors = vtkDataArray.newInstance({ name: 'fieldName', values }); dataset.getPointData().setScalars(colors); mapper.setInputData(dataset); [...] On Wed, Feb 27, 2019 at 4:10 AM Turner, Shruti > wrote: Hello, I am trying to render an STL file within a web application using VTK.js and trying to get some help with adding colours to it and interpolation. I have added my code below which currently does the following: ? Reads in and Renders the STL file ? Adds colour to points if the vertex index is in a pressure_sensors array. I have the following 2 questions: 1. Is this the best way to add colours to the model? 2. How best to interpolate between the given data points to show a colourmap across the surface? I have tried to look through the VTK.js website, however I am struggling to make any headway with how to achieve more than I already have done. Thanks, Shruti import 'vtk.js/Sources/favicon'; import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; import vtkSTLReader from 'vtk.js/Sources/IO/Geometry/STLReader'; import vtkOpenGLRenderWindow from 'vtk.js/Sources/Rendering/OpenGL/RenderWindow'; import vtkRenderWindow from 'vtk.js/Sources/Rendering/Core/RenderWindow'; import vtkRenderWindowInteractor from 'vtk.js/Sources/Rendering/Core/RenderWindowInteractor'; import vtkRenderer from 'vtk.js/Sources/Rendering/Core/Renderer'; import vtkInteractorStyleTrackballCamera from 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera'; import axios from 'axios' import vtkLookupTable from 'vtk.js/Sources/Common/Core/LookupTable'; //---------------------------------------------------------------------------- // Example code // ---------------------------------------------------------------------------- const reader = vtkSTLReader.newInstance({ interpolateScalarsBeforeMapping: true }); const 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] // ---------------------------------------------------------------------------- function update() { const colors = { tupleValues: [], insertNextTupleValue: (color) => { for (let i = 0; i < color.length; i++) { colors.tupleValues.push(color[i]); } }, getNumberOfComponents: () => { return 3; }, getDataType: () => { return 'array'; }, getNumberOfTuples: () => { return colors.tupleValues.length / colors.getNumberOfComponents(); }, getData: () => { return colors.tupleValues; } }; const mapper = vtkMapper.newInstance(); const actor = vtkActor.newInstance(); const lookup = vtkLookupTable.newInstance(); lookup.setNumberOfColors(1024), lookup.setRange(0, 1); lookup.build(); mapper.setLookupTable(lookup); mapper.setInterpolateScalarsBeforeMapping(true); mapper.setUseLookupTableScalarRange(lookup); for (let i = 0; i < reader.getOutputData().getPoints().getNumberOfPoints(); i = i + 1) { const color = []; if (sensor_locations.includes(i)) { var x = Math.random(); color[0] = x color[1] = x color[2] = x } else { color[0] = null color[1] = null color[2] = null } colors.insertNextTupleValue(color); } reader.getOutputData().getPointData().setScalars(colors); mapper.setInputConnection(reader.getOutputPort()); actor.setMapper(mapper); // ---------------------------------------------------------------------------- // Standard rendering code setup // ---------------------------------------------------------------------------- const renderWindow = vtkRenderWindow.newInstance(); const renderer = vtkRenderer.newInstance({ background: [0.2, 0.3, 0.4] }); renderWindow.addRenderer(renderer); // ---------------------------------------------------------------------------- // Add the actor to the renderer and set the camera based on it // ---------------------------------------------------------------------------- renderer.addActor(actor); renderer.resetCamera(); // ---------------------------------------------------------------------------- // Use OpenGL as the backend to view the all this // ---------------------------------------------------------------------------- const openglRenderWindow = vtkOpenGLRenderWindow.newInstance(); renderWindow.addView(openglRenderWindow); // ---------------------------------------------------------------------------- // Create a div section to put this into // ---------------------------------------------------------------------------- const container = document.createElement('div'); container.style.height = "600px"; container.style.width = "600px" document.querySelector('body').appendChild(container); openglRenderWindow.setContainer(container); // ---------------------------------------------------------------------------- // Capture size of the container and set it to the renderWindow // ---------------------------------------------------------------------------- const { width, height } = container.getBoundingClientRect(); openglRenderWindow.setSize(width, height); // ---------------------------------------------------------------------------- // Setup an interactor to handle mouse events // ---------------------------------------------------------------------------- const interactor = vtkRenderWindowInteractor.newInstance(); interactor.setView(openglRenderWindow); interactor.initialize(); interactor.bindEvents(container); // ---------------------------------------------------------------------------- // Setup interactor style to use // ---------------------------------------------------------------------------- interactor.setInteractorStyle(vtkInteractorStyleTrackballCamera.newInstance()); // render(); } reader.setUrl(`./newpivot.stl`, { binary: true }).then(update); _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 77020 bytes Desc: PastedGraphic-1.png URL: From sebastien.jourdain at kitware.com Wed Feb 27 16:56:30 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 27 Feb 2019 14:56:30 -0700 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS In-Reply-To: <1CBFD5E3-0314-4810-AFAF-EDAB518E93A0@ic.ac.uk> References: <95D22503-E324-4B4D-9724-DE5E52E67A7C@ic.ac.uk> <1CBFD5E3-0314-4810-AFAF-EDAB518E93A0@ic.ac.uk> Message-ID: That looks correct (respecting what you are asking vtk to draw), you seems to only have data on a couple of them where you see variation of color within some triangles. The rest remain a single color as those values are the same and since you did not reversed the hue range, those values are probably 0. So interpolating from 0 to 0 give you a solid color. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 77020 bytes Desc: not available URL: From s.turner17 at imperial.ac.uk Wed Feb 27 17:07:39 2019 From: s.turner17 at imperial.ac.uk (Turner, Shruti) Date: Wed, 27 Feb 2019 22:07:39 +0000 Subject: [vtkusers] Add colour and interpolate an STL file with VTK.JS In-Reply-To: References: <95D22503-E324-4B4D-9724-DE5E52E67A7C@ic.ac.uk> <1CBFD5E3-0314-4810-AFAF-EDAB518E93A0@ic.ac.uk>, Message-ID: Thank you for the explanation. I'm sorry, if I'm missing something obvious but this is my first time doing something like this. What I need to achieve is interpolation between the points with colour to give a pressure map across the entire model. What you have said makes sense, I'm just not sure how to change my code in order to achieve what I want to achieve.. Thanks, Shruti. -------- Original message -------- From: Sebastien Jourdain Date: 27/02/2019 21:57 (GMT+00:00) To: "Turner, Shruti" Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Add colour and interpolate an STL file with VTK.JS That looks correct (respecting what you are asking vtk to draw), you seems to only have data on a couple of them where you see variation of color within some triangles. The rest remain a single color as those values are the same and since you did not reversed the hue range, those values are probably 0. So interpolating from 0 to 0 give you a solid color. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco12nar at hotmail.it Thu Feb 28 04:46:54 2019 From: marco12nar at hotmail.it (marco festugato) Date: Thu, 28 Feb 2019 02:46:54 -0700 (MST) Subject: [vtkusers] display 200 DICOM images in 3d using VTK Message-ID: <1551347214306-0.post@n5.nabble.com> Hi guys, Im' really new to VTK. What I want to do is displaying 200 DICOM images in 3D using VTK but I really don't know how this works...is the pipeline like this: reader -> mapper -> actor -> renderer ??? Here's my code: #include #include #include #include #include #include #include int main(int argc, char* argv[]) { // Verify input arguments if ( argc != 2 ) { std::cout << "Usage: " << argv[0] << "- FolderDirectoryDICOMimages" << std::endl; return EXIT_FAILURE; } std::string inputFilename = argv[1]; // Read all the DICOM files in the specified directory. vtkSmartPointer reader =vtkSmartPointer::New(); reader->SetDirectoryName(argv[1]); reader->Update(); // Visualize vtkSmartPointer mapper = vtkSmartPointer::New(); vtkSmartPointer actor = vtkSmartPointer::New(); vtkSmartPointer iren = vtkSmartPointer::New(); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renWin = vtkSmartPointer::New(); mapper -> SetInputData(reader -> GetOutputPort()); actor-> SetMapper(mapper); renderer-> AddActor(actor); renderer->SetBackground(0,0,0); renWin-> AddRenderer(renderer); renWin->SetSize(800,800); iren->SetRenderWindow(renWin); renWin->Render(); iren->Start(); return EXIT_SUCCESS; } I receive an error when using "SetInputData" and "GetOutputPort"...what else should I use? I can't find anything online. Thanks in advance for your answer! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Thu Feb 28 13:04:03 2019 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 28 Feb 2019 11:04:03 -0700 Subject: [vtkusers] display 200 DICOM images in 3d using VTK In-Reply-To: <1551347214306-0.post@n5.nabble.com> References: <1551347214306-0.post@n5.nabble.com> Message-ID: Hi Marco, The vtkImageMapper is not compatible with vtkActor, mainly because vtkImageMapper is for 2D graphics and vtkActor is for 3D graphics (but also because vtkActor is for polygonal data). Here is a link to some examples of displaying images with VTK: https://lorensen.github.io/VTKExamples/site/Cxx/#working-with-images Cheers, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Feb 28 16:13:04 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 28 Feb 2019 16:13:04 -0500 Subject: [vtkusers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Feb 28 18:54:10 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 28 Feb 2019 15:54:10 -0800 Subject: [vtkusers] [vtk-developers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: