[vtk-developers] Fwd: bug in vtkContourRepresentation ?
karthik.krishnan at kitware.com
Wed Mar 21 05:08:01 EDT 2012
I had fixed in VTK a few months ago (post the VTK58 release). Please switch
to the development version
On Wed, Mar 21, 2012 at 1:12 PM, NsPx <nspx.roronoa at gmail.com> wrote:
> Dear vtk developpers,
> I think I felt on a bug concerning vtkContourRepresentation but i'm not
> sure so i'm exposing the situation. Then you'll confirm me or not.
> (vtk 5.8, windows XP 32bits, visual studio 2008)
> I use vtkOrientedGlyphContourRepresentation (with
> vtkPolygonalSurfacePointPlacer and
> vtkPolygonalSurfaceContourLineInterpolator) via vtkContourWidget to draw a
> contour on a mesh interactively.
> However when I want to close the contour, the penultimate line is reset to
> be a simple segment.
> I found the problem comes from the function : void
> vtkContourRepresentation::UpdateLines( int index ) in this portion of code :
> if (this->LineInterpolator)
> vtkIntArray *arr = vtkIntArray::New();
> this->LineInterpolator->GetSpan( index, arr, this );
> int nNodes = arr->GetNumberOfTuples();
> for (int i = 0; i < nNodes; i++)
> arr->GetTupleValue( i, indices );
> this->UpdateLine( indices, indices );
> if I understand well, this function clear the path between node
> indices and indices and build it again. But when indices=nNodes-1
> and indices=nNodes-2 (or vice-versa) this line is only cleared.
> Please someone confirm the problem.
> This test can be reproduce using the example on the wiki and closing a
> contour on the sphere :
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtk-developers