[vtkusers] [VTK] Crop PolyData with BoxWidget

Jon Haitz Legarreta jhlegarreta at vicomtech.org
Thu Apr 23 08:45:53 EDT 2015


Hi there,
I'm trying to define a volume of interest over a vtkPolyData with the aid
of a vtkBoxWidget. I would like to crop or strip away the polyData that
lies inside the box, and be able to store the outside part of the original
PolyData. I'm aware of the clipping option, but hiding the clipped part is
not enough as I need to produce a new PolyData object.

My input data is a volume in metaimage format (mhd) read with ITK (I'm
using ITK 4.6.0, but would dare to say that virtually any VTK4 would work),
then converted to a VTK image, and its isosurface rendered.

I am unable to find the right way to do this. I guess there's something
that I'm missing in the pipeline I need.

My test program and data are attached.

Also, attached is what I'm looking for done in ParaView.

For compatibility issues with some other target application, the VTK
version I'm using is a bit old (VTK 5.10.1). I'd dare to say that it's not
an issue to use VTK6 or earlier in this case.

Thanks a lot,
JON HAITZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150423/90a33131/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyDataCropping.zip
Type: application/zip
Size: 26254 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150423/90a33131/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyDataCropBox-ParaView.jpg
Type: image/jpeg
Size: 167207 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150423/90a33131/attachment-0001.jpg>


More information about the vtkusers mailing list