[vtk-developers] vtkContourWidget ClosedLoop

Dean Inglis dean.inglis at sympatico.ca
Wed Apr 30 12:10:24 EDT 2008


vtkContourWidget currently allows defining a contour
as being closed if a third node is placed as the last
(right button click).  Regardless of the order of
interpolation (e.g., MaximumCurveLineSegments with 
vtkBezierContourLineInterpolator), you get what appears
to be a straight line between two nodes, and the contour
declares that the representation has a ClosedLoop.
I would like to change this behaviour to only allow
ClosedLoop to be true if the number of nodes is > 2
when the last node is placed.  In this case, if the
minimum number of nodes is 3 and the last node 
(fourth) is placed over the first, the contour will close 
and end up having 3 nodes, thereby defining a "true"
closed loop and not a straight line.  If there are no
objections, I will commit a fix to vtkContourWidget.cxx.

thanks,
Dean




More information about the vtk-developers mailing list