<div dir="ltr"><div><div>Hi Weiguang,<br><br></div>you can use non-axis aligned planes to crop a volume by retrieving the 6 planes defining<br>the box widget in a call back and passing them to your volume mapper:<br><br> vtkBoxWidget2 *self = reinterpret_cast<vtkBoxWidget2*>( caller );<br>
vtkBoxRepresentation2* rep =<br> vtkBoxRepresentation2::SafeDownCast( self->GetRepresentation() );<br> rep->GetPlanes( this->Planes );<br> this->Volume->GetMapper()->SetClippingPlanes( this->Planes );<br>
<br></div>Dean <br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 20, 2013 at 2:05 PM, Weiguang Guan <span dir="ltr"><<a href="mailto:guanw@rhpcs.mcmaster.ca" target="_blank">guanw@rhpcs.mcmaster.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have a volume data of vtkImageData type, and would like to do volume rendering of a portion of it, specified by a vtkBoxWidget. The box widget is rotation enabled so that the region of interest may not align with x-y-z axes. I hesitate to use vtkClipVolume because it would change the data to unstructured gird data and the fast texture-mapping based volume rendering couldn't be used. Can someone suggest a better solution for what I want to do? Thanks.<br>
<br>
Best,<br>
Weiguang<br>
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>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" target="_blank">http://www.vtk.org/Wiki/VTK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/<u></u>listinfo/vtkusers</a><br>
</blockquote></div><br></div>