[vtkusers] vtkSplineFilter not distributing points evenly...

Rakesh Patil rakeshthp at in.com
Tue Feb 2 07:36:55 EST 2010


 Well,I didn't get the meaning of this "but you have to set the number of points of the output."To which object do we need to set the number of points of output?Thanks Original message From:=?ISO88591?B?Suly9G1l?=< jerome.velut at gmail.com >Date: 02 Feb 10 14:50:56Subject:Re: [vtkusers] vtkSplineFilter not distributing points evenly...To: Rakesh Patil Hi Rakesh,I think that the "SetSubdivideToLength" is guilty. IMHO, your lines are notmultiple of 50. Then, SplineFilter has to adapt at least an ending edge.Maybe but not for sure you can try with SetSubdivideToSpecified: the filter should compute a subdivision length accordingly to an uniformsampling, but you have to set the number of points of the output.HTHJerome2010/2/2 Rakesh Patil Hello, I construct a polyline from the output of contourfilter. After constructing polyline, i found that, the points in this polyline are unevenly spaced(unequally spaced). Thus i used vtkSplineFilter to distribute points evenly on this polyline.B
 ut when i get the output from this filter, is like, at the junction point, of two 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/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxx I 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  Powered by www.kitware.comVisit other Kitware opensource projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages ontopic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTKFAQFollow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100202/a850d7f7/attachment.htm>


More information about the vtkusers mailing list