[vtkusers] Fwd: [VTK] Cutting away cells from a PolyData within a vtkBoxWidget

Jon Haitz Legarreta jhlegarreta at vicomtech.org
Tue Feb 10 11:17:41 EST 2015


Hi there,
anybody, please?
Thanks
JON


---------- Forwarded message ----------
From: Jon Haitz Legarreta <jhlegarreta at vicomtech.org>
Date: 9 February 2015 at 13:54
Subject: [VTK] Cutting away cells from a PolyData within a vtkBoxWidget
To: "vtkusers at vtk.org" <vtkusers at vtk.org>


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/20150210/7fe54d9d/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/20150210/7fe54d9d/attachment.zip>


More information about the vtkusers mailing list