[vtk-developers] question about vtkContourWidget/vtkContourRepresentation?

Karthik Krishnan karthik.krishnan at kitware.com
Fri May 7 13:49:26 EDT 2010


Yes, that surely explains the behaviour Nicolas is getting. The way to look
at the initialization for the contour widget is that its initializing the
control points. The input is sort of assumed to a vtkPolyData containing a
single vtkPolyline cell. (in which case, the points would have been in
order).



On Fri, May 7, 2010 at 11:35 AM, Arnaud GELAS
<arnaud_gelas at hms.harvard.edu>wrote:

> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100507/a2d341e3/attachment.html>


More information about the vtk-developers mailing list