[vtk-developers] question about vtkContourWidget/vtkContourRepresentation?

Arnaud GELAS arnaud_gelas at hms.harvard.edu
Fri May 7 11:35:05 EDT 2010


Hi guys,

I was looking at the code of vtkContourWidget::Initialize and thus 
vtkContourRepresentation::Initialize method, and it seems that the 
initialization does not take into account the connectivity information 
stored into the input polydata.
For instance, vtkContourRepresentation appends to the node container 
points from the input polydata in the same order of the points container.

In vtkContourRepresentation.cxx

1217   for ( vtkIdType i=0; i < nPoints; i++ )
1218     {
1219     double *p = points->GetPoint( i );
1220     this->AddNodeAtWorldPosition( p, worldOrient );
1221     }

I guess such a behavior may explain why Nicolas gets such results when 
passing a contour resulting from a marching squares to a contour widget.

http://www.vtk.org/pipermail/vtkusers/2010-May/108826.html

I just wonder if it is supposed to be the normal behavior?
and if not what would be the best way to fix it?
assuming the polydata contains lines? assuming the input comes from a 
vtkStripper?

Thanks,
Best,
Arnaud





More information about the vtk-developers mailing list