[vtkusers] Pick & delete cell

David Doria daviddoria at gmail.com
Thu Feb 28 08:27:34 EST 2013


On Wed, Feb 27, 2013 at 8:34 PM, Alex Malyushytskyy <alexmalvtk at gmail.com>wrote:

> I believe you can't obtain polydata when making shallow copy of
> unstructured grid.
> Filter has to be invoked.
>
> Check vtkGeometryFilter .
>
> Alex


That is correct, but I thought the idea of vtkDataObjectAlgorithm was that
the output type gets set to the input type. I looked into it, and while
that is true, vtkExtractSelectionBase has a section in RequestDataObject
that checks the PreserveTopology flag. If this flag is true, it will pass
the PolyData through the selection filter in tact, adding an array
describing which points belong to the selection. If PreserveTopology is
false, it will produce a vtkUnstructuredGrid as the output. This explains
the behavior and why we needed to retrieve the output as a
vtkUnstructuredGrid even though we pass it a vtkPolyData in the example.
However, Alex is right that if you want to get back a PolyData you can just
use the vtkGeometryFilter (
http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter)orvtkDataSetSurfaceFilter
(
http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter)

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130228/6b3c8747/attachment.htm>


More information about the vtkusers mailing list