[vtkusers] vtkSplineFilter not distributing points evenly...

Rakesh Patil rakeshthp at in.com
Tue Feb 2 01:57:51 EST 2010


 Hello, I construct a polyline from the output of contourfilter. After constructingpolyline, i found that, the points in this polyline are unevenly spaced(unequally spaced). Thus i used vtkSplineFilter to distribute points evenly on this polyline.But when i get the output from this filter, is like, at the junction point, oftwo lines, points are more closer than the specified length, here is the code what i wrote.// few lines of code, to construct unstructuredGrid// which is passed to the contourfiltervtkContourFilter *contFilter = vtkContourFilter::New();contFilter>SetInputConnection(del>GetOutputPort());contFilter>GenerateValues(1, 8.5, 8.5);contFilter>Update();vtkSplineFilter *sf = vtkSplineFilter::New();sf>SetInputConnection(contFilter>GetOutputPort());sf>SetSubdivideToLength();sf>SetLength(50);vtkStripper *stp = vtkStripper::New();stp>SetInputConnection( sf>GetOutputPort());stp>Update();Later I extract a polyline from vtkStripper as shown inexample below:http://vtk.org/Wi
 ki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxxI do get the output as expected but with a small variation. i.e. at the place wheretwo lines meet, the spacing is not same as mentioned in the code.How do i overcome this problem..??Thanks in advance 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100202/0bce965e/attachment.htm>


More information about the vtkusers mailing list