<div class="gmail_quote">On Thu, Feb 21, 2013 at 2:33 PM, Massinissa Bandou <span dir="ltr"><<a href="mailto:Massinissa.Bandou@usherbrooke.ca" target="_blank">Massinissa.Bandou@usherbrooke.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi David, thank you so much for your explanation.<br>
<br>
I'm wondering if I remove some particular cells then I have to re-index the<br>
whole data.<br>
Do I need to pass the UnstructuredGrid to vtkDataSetSurfaceFilter to get the<br>
polydata? because I think it's the only way to delete the selected cells.<br>
<br>
Thnx<br>
<br>
Massi<br></blockquote><div><br>You can use the vtkIdFilter (<a href="http://www.vtk.org/doc/nightly/html/classvtkIdFilter.html">http://www.vtk.org/doc/nightly/html/classvtkIdFilter.html</a>) to maintain/reference the ids of the original cells.<br clear="all">
<div><br>I don't understand what you mean about needing to create a vtkPolyData from the vtkUnstructuredGrid? Do you mean you're starting with a vtkPolyData and you want to end up with a vtkPolyData? It looks like vtkExtractSelection is a subclass of vtkDataObjectAlgorithm, which I think means that you can ShallowCopy its output directly into a vtkPolyData instead of a vtkUnstructuredGrid like is done in the example? Give it a try and let us know if it works. In fact, I'd be inclined to change the example to use only vtkPolyData if it works as expected (I'm not sure if vtkExtractSelection has been changed since we initially wrote the example?).<br>
<br>David</div></div></div>