[vtkusers] Clip volume data

Weiguang Guan guanw at rhpcs.mcmaster.ca
Wed Aug 21 11:23:43 EDT 2013


Excellent solution! Thanks, Dean.

Weiguang

On 21/08/2013 9:28 AM, Dean Inglis wrote:
> 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 <mailto: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 <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     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
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtkusers
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130821/cdefe7d4/attachment.htm>


More information about the vtkusers mailing list