<div class="gmail_quote">On Wed, Feb 27, 2013 at 8:34 PM, Alex Malyushytskyy <span dir="ltr"><<a href="mailto:alexmalvtk@gmail.com" target="_blank">alexmalvtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I believe you can't obtain polydata when making shallow copy of<br>
unstructured grid.<br>
Filter has to be invoked.<br>
<br>
Check vtkGeometryFilter .<br>
<span class="HOEnZb"><font color="#888888"><br>
Alex</font></span></blockquote><div><br>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 (<a href="http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter)or">http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter)or</a> vtkDataSetSurfaceFilter (<a href="http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter">http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter</a>)<br>
<br>David<br></div></div>