<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Good tips, indeed.<div><br></div><div>Any example or particular class for the purpose?</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 11:02:07 -0700<br>Subject: Re: [vtkusers] slice a volume<br>To: wangq1979@outlook.com<br>CC: vtkusers@vtk.org<br><br><div dir="ltr">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.<div><br></div><div> - David</div><div><br><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">On Fri, Feb 12, 2016 at 10:48 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">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>From: <a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a><br>Date: Fri, 12 Feb 2016 10:25:21 -0700<span><br>Subject: Re: [vtkusers] slice a volume<br></span>To: <a href="mailto:wangq1979@outlook.com" target="_blank">wangq1979@outlook.com</a><br>CC: <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><div><div class="h5"><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><br><div>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 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><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></div>                                    </div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div></div></div></div>                                           </div></body>
</html>