<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks David,<div><br></div><div>Sounds like meta-meta programming. </div><div><br></div><div>Is it possible to save the data of the image like a sequence of slices, and then load as an image data for cutting?</div><div><br></div><div>Cheers,</div><div><br></div><div>Chiang<br><br><div><hr id="stopSpelling">From: david.gobbi@gmail.com<br>Date: Fri, 12 Feb 2016 10:25:21 -0700<br>Subject: Re: [vtkusers] slice a volume<br>To: wangq1979@outlook.com<br>CC: vtkusers@vtk.org<br><br><div dir="ltr"><div>Hi Chiang,</div><div><br></div><div>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!</div><div><br></div><div>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.</div><div><br></div><div>In summary: I don't think there is an easy solution.  Hopefully someone will prove me wrong!</div><div><br></div><div> - David</div><br><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">On Fri, Feb 12, 2016 at 9:55 AM, WangQ <span dir="ltr"><<a href="mailto:wangq1979@outlook.com" target="_blank">wangq1979@outlook.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">


<div><div dir="ltr">Hello,<div><br></div><div>Thanks for the prompt response.</div><div><br></div><div>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. </div><div><br></div><div>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. </div><div><br></div><div>Cheers,</div><div><br></div><div>Chiang<br><div><div><div><div class="h5"><div><blockquote style="border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr"><div><div><div dir="ltr"><div><br></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></div></blockquote></div></div></div></div></div>                                       </div></body>
</html>