[vtkusers] slice a volume
WangQ
wangq1979 at outlook.com
Fri Feb 12 13:26:00 EST 2016
Good tips, indeed.
Any example or particular class for the purpose?
Cheers,
Chiang
From: david.gobbi at gmail.com
Date: Fri, 12 Feb 2016 11:02:07 -0700
Subject: Re: [vtkusers] slice a volume
To: wangq1979 at outlook.com
CC: vtkusers at vtk.org
No, that really isn't possible. In any case, it would be far easier and far, far more efficient to export the scene as a single polygonal object (using point attributes for colors and whatnot) and then apply vtkCutter to it.
- David
On Fri, Feb 12, 2016 at 10:48 AM, WangQ <wangq1979 at outlook.com> wrote:
Thanks David,
Sounds like meta-meta programming.
Is it possible to save the data of the image like a sequence of slices, and then load as an image data for cutting?
Cheers,
Chiang
From: david.gobbi at gmail.com
Date: Fri, 12 Feb 2016 10:25:21 -0700
Subject: Re: [vtkusers] slice a volume
To: wangq1979 at outlook.com
CC: vtkusers at vtk.org
Hi Chiang,
It sounds like you need something that will select some or all of the actors in the scene, trace backwards through the pipeline to get the data, apply a cutter to the data, and then create new mappers and actors to show the cut. This is possible, but not easy!
Another approach is to create an additional layer of abstraction on top of VTK to manage situations like this. For example, you could create a "SuperActor" class to manage the extra filters, mappers, and actors that are needed to display the cut. Then, if you give a cutting plane to the "SuperActor", it can automatically add the vtkCutter, a new mapper, and a new actor to the renderer. And a "SuperSuperActor" could be used to manage multiple "SuperActors". All of this requires a lot of programming, however.
In summary: I don't think there is an easy solution. Hopefully someone will prove me wrong!
- David
On Fri, Feb 12, 2016 at 9:55 AM, WangQ <wangq1979 at outlook.com> wrote:
Hello,
Thanks for the prompt response.
However, the point is that the shown volume is not from single input. The spheres inside the cylinder are generated dynamically, and included in the vtkRender one by one, i.e. each sphere has its own mapper, actor, etc. Therefore, simply using cutter or plane is unable to fulfill the slicing.
One thing I can imagine is that if I can get the data from the renderer, I can then apply cutter or plane to slice it. But I do not know how to get the data.
Cheers,
Chiang
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: 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: <http://public.kitware.com/pipermail/vtkusers/attachments/20160213/eb2cdc34/attachment.html>
More information about the vtkusers
mailing list