<br><font size=3>my_polyData</font><font size=2 face="sans-serif"> is at
the end of a pipeline. Each time you Update it (which is done at each frame
if you render it), it is reset to the output of the previous filter.</font>
<br><font size=2 face="sans-serif">If you want to break the dependency
chain, you have to insert a ShallowCopy : </font>
<br><font size=2 face="sans-serif">output = </font><font size=3>my_vtkPolyDataConnectivityFilter->GetOutput();</font>
<br><font size=3>my_polyData</font><font size=2 face="sans-serif"> = vtkPolyData::New();</font>
<br><font size=3>my_polyData</font><font size=2 face="sans-serif">->ShallowCopy(output);</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">and remeber to call </font><font size=3>my_polyData</font><font size=2 face="sans-serif">->Delete()
later.</font>
<br>
<br><font size=2 face="sans-serif">But the best way would be to implement
a filter that does the job to remove some cells, so that your pipeline
is still connected.</font>
<br>
<br><font size=2 face="sans-serif">Stephane</font>
<br><font size=2 face="sans-serif"><br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>cocoricore@gmail.com</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : vtkusers-bounces@vtk.org</font>
<p><font size=1 face="sans-serif">28/07/2009 15:47</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">dominik@itis.ethz.ch</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">vtkusers@vtk.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [vtkusers] How to really delete
cells?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>No change.<br>
</font>
<br><font size=3>2009/7/28 Dominik Szczerba <</font><a href=mailto:dominik@itis.ethz.ch><font size=3 color=blue><u>dominik@itis.ethz.ch</u></font></a><font size=3>></font>
<br><font size=3>And what does calling ->Update() ?<br>
<br>
Corinne Tith wrote:</font>
<br><font size=3>Thanks for your help. I tried to put your code after my_polyData->RemoveDeletedCells();<br>
Unfortunately It doesn't work.<br>
I tried to delete lot of cells, they are never really removed.<br>
<br>
My VTK version is 5.2, does it matter?<br>
<br>
</font>
<br><font size=3>2009/7/28 Dominik Szczerba <</font><a href=mailto:dominik@itis.ethz.ch target=_blank><font size=3 color=blue><u>dominik@itis.ethz.ch</u></font></a><font size=3>
<mailto:</font><a href=mailto:dominik@itis.ethz.ch target=_blank><font size=3 color=blue><u>dominik@itis.ethz.ch</u></font></a><font size=3>>></font>
<br><font size=3><br>
<br>
my_polyData->Modified()<br>
<br>
Corinne Tith wrote:<br>
<br>
Hi all,<br>
<br>
I get a polydata volume with a vtkContourFilter
and a<br>
vtkWindowSincPolyDataFilter.<br>
Some cells are not connected to the largest
volume. They seem to<br>
be 'on' the mesh but have no vertice in common.<br>
<br>
I tried the filters vtkCleanPolyData and<br>
vtkPolyDataConnectivityFilter, but most of my
unconnected cells<br>
are not removed.<br>
Finally, I tried to delete them 'manually',
but nothing happens.<br>
<br>
How can I really remove my unconnected cells?<br>
<br>
Any help is appreciated, thanks!<br>
<br>
<br>
// generate my volume<br>
my_vtkWindowSincPolyDataFilter->SetInputConnection(my_vtkContourFilter->GetOutputPort());<br>
<br>
// no effect on my cells<br>
my_vtkCleanPolyData->SetInputConnection(my_vtkWindowSincPolyDataFilter->GetOutputPort());<br>
<br>
my_vtkCleanPolyData->PointMergingOn();<br>
my_vtkPolyDataConnectivityFilter->SetInputConnection(my_vtkContourFilter->GetOutputPort());<br>
my_vtkPolyDataConnectivityFilter->SetExtractionModeToLargestRegion();<br>
// manual remove<br>
my_vtkPolyDataConnectivityFilter->Update();<br>
my_polyData = my_vtkPolyDataConnectivityFilter->GetOutput();<br>
for(int i = 0; i < n; i++){<br>
my_polyData->DeleteCell(cellsToRemove[i]);<br>
}<br>
my_polyData->RemoveDeletedCells();<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________</font>
<br><font size=3> Powered by </font><a href=http://www.kitware.com/ target=_blank><font size=3 color=blue><u>www.kitware.com</u></font></a><font size=3>
<</font><a href=http://www.kitware.com/ target=_blank><font size=3 color=blue><u>http://www.kitware.com</u></font></a><font size=3>></font>
<br><font size=3><br>
<br>
Visit other Kitware open-source projects at<br>
</font><a href=http://www.kitware.com/opensource/opensource.html target=_blank><font size=3 color=blue><u>http://www.kitware.com/opensource/opensource.html</u></font></a><font size=3><br>
<br>
Please keep messages on-topic and check the
VTK FAQ at:<br>
</font><a href=http://www.vtk.org/Wiki/VTK_FAQ target=_blank><font size=3 color=blue><u>http://www.vtk.org/Wiki/VTK_FAQ</u></font></a><font size=3><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
</font><a href=http://www.vtk.org/mailman/listinfo/vtkusers target=_blank><font size=3 color=blue><u>http://www.vtk.org/mailman/listinfo/vtkusers</u></font></a><font size=3><br>
<br>
<br>
</font>
<br>
<br><tt><font size=2>_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.vtk.org/mailman/listinfo/vtkusers<br>
</font></tt>
<br>