<br><br><blockquote>Thanks Bill, <br><br>It worked. But the output what I get from vtkSplineFilter is a smooth curve. Can't I avoid this smoothness by any means..??<br><br>Thanks<br><br>---------- Original message ----------<br>From:Bill Lorensen< bill.lorensen@gmail.com ><br>Date: 02 Feb 10 18:40:16<br>Subject: Re: [vtkusers] vtkSplineFilter not distributing points evenly...<br>To: Rakesh Patil <rakeshthp@in.com><br><br>You should run the spline on the output of the stripper NOT the output<br>of the contour filter. Contour filter produces independent line<br>segments of length 2. The stripper connects the contour lines into<br>multiple point poly lines.<br><br>On Tue, Feb 2, 2010 at 1:57 AM, Rakesh Patil <rakeshthp@in.com> wrote:<br>> Hello,<br>><br>> I construct a polyline from the output of contourfilter. After constructing<br>> polyline, i found that, the points in this polyline are unevenly spaced<br>> (unequally spaced).<br>><br>> Thus i use
d vtkSplineFilter to distribute points evenly on this polyline.<br>> But when i get the output from this filter, is like, at the junction point,<br>> of<br>> two lines, points are more closer than the specified length, here is<br>> the code what i wrote.<br>><br>> // few lines of code, to construct unstructuredGrid<br>> // which is passed to the contourfilter<br>><br>> vtkContourFilter *contFilter = vtkContourFilter::New();<br>> contFilter->SetInputConnection(del->GetOutputPort());<br>> contFilter->GenerateValues(1, -8.5, -8.5);<br>> contFilter->Update();<br>><br>> vtkSplineFilter *sf = vtkSplineFilter::New();<br>> sf->SetInputConnection(contFilter->GetOutputPort());<br>> sf->SetSubdivideToLength();<br>> sf->SetLength(50);<br>><br>> vtkStripper *stp = vtkStripper::New();<br>> stp->S etInputConnection( sf->GetOutputPort());<br>> stp->Update();<br>><br>> Later I extract a poly
line from vtkStripper as shown in<br>> example below:<br>><br>> <a target=\"_blank\" href="http://vtk.org/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxx" target="_blank">http://vtk.org/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxx</a><br>><br>> I do get the output as expected but with a<br>> small variation. i.e. at the place where<br>> two lines meet, the spacing is not same as<br>> mentioned in the code.<br>><br>> How do i overcome this problem..??<br>><br>> Thanks in advance<br>><br>><br>> _______________________________________________<br>> Powered by <a target=\"_blank\" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at<br>> <a target=\"_blank\" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><b
r>> Please keep messages on-topic and check the VTK FAQ at:<br>> <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a target=\"_blank\" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br></rakeshthp@in.com></rakeshthp@in.com></blockquote>