[vtkusers] [VTK] Cutting away cells from a PolyData within a vtkBoxWidget
Jon Haitz Legarreta
jhlegarreta at vicomtech.org
Mon Feb 9 07:54:29 EST 2015
Hi there,
I'm using vtkBoxWidget to define a volume of (*un*)interest over a
vtkPolyData. I would like to cut away the vtkPolyData cells that lie inside
the planes defined by the vtkBoxWidget. I thought that the
vtkExtractPolyDataGeometry filter would do the job.
I've started with the extractPolyData.py example [1], and then switched to
an "easier" implicit function defined by a cylinder to see whether the
approach would work. Apparently, it would.
However, when it comes to using the vtkBoxWidget, there seems to be some
issue, since either I'm not applying the vtkBoxWidget correctly or the
vtkExtractPolyDataGeometry filter is not yielding the expected output.
I've tried to set up two viewports so that I am able to interact with the
polyData and the vtkBoxWidget on one, and see the extracted polyData on the
other. However, the vtkBoxWidget is displayed on the second viewport, so
this is another added issue.
The input polyData is built from a segmentation dataset.
The attempt and input dataset can be found attached. Example3.
Am I missing something?
Thanks,
JON
P.S.: The ITK to VTK image filter is included for I am not using the
vtkGlue flag for historical reasons.
[1]
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Extraction/Testing/Python/extractPolyData.py
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150209/175dadd9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyDataCropping.zip
Type: application/zip
Size: 49866 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150209/175dadd9/attachment.zip>
More information about the vtkusers
mailing list