[vtkusers] Clip volume data
Dean Inglis
inglis.dl at gmail.com
Wed Aug 21 09:28:08 EDT 2013
Hi Weiguang,
you can use non-axis aligned planes to crop a volume by retrieving the 6
planes defining
the box widget in a call back and passing them to your volume mapper:
vtkBoxWidget2 *self = reinterpret_cast<vtkBoxWidget2*>( caller );
vtkBoxRepresentation2* rep =
vtkBoxRepresentation2::SafeDownCast( self->GetRepresentation() );
rep->GetPlanes( this->Planes );
this->Volume->GetMapper()->SetClippingPlanes( this->Planes );
Dean
On Tue, Aug 20, 2013 at 2:05 PM, Weiguang Guan <guanw at rhpcs.mcmaster.ca>wrote:
> Hello,
>
> 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.
>
> Best,
> Weiguang
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130821/7a8fad09/attachment.htm>
More information about the vtkusers
mailing list