[vtkusers] slice a volume

WangQ wangq1979 at outlook.com
Fri Feb 12 12:48:28 EST 2016


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

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160213/39ab7269/attachment.html>


More information about the vtkusers mailing list