<br><br><blockquote>Well,<br><br>I didn't get the meaning of this <br><br>"but you have to set the number of points of the output."<br><br>To which object do we need to set the number of points of output?<br>Thanks<br><br>---------- Original message ----------<br>From:=?ISO-8859-1?B?Suly9G1l?=&lt; jerome.velut@gmail.com &gt;<br>Date: 02 Feb 10 14:50:56<br>Subject:  Re: [vtkusers] vtkSplineFilter not distributing points evenly...<br>To: Rakesh Patil <rakeshthp@in.com><br><br>Hi Rakesh,<br><br>I think that the "SetSubdivideToLength" is guilty. IMHO, your lines are not<br>multiple of 50. Then, SplineFilter has to adapt at least an ending edge.<br><br>Maybe -but not for sure- you can try with SetSubdivideToSpecified: the<br>
filter should compute a subdivision length accordingly to an uniform<br>sampling, but you have to set the number of points of the output.<br><br>HTH<br>Jerome<br><br><div class="gmail_quote">2010/2/2 Rakesh Patil <span dir="ltr">&lt;<a target=\"_blank\" target="\&quot;_blank\&quot;" href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>&gt;</span><br>
<font color="#000000"></font><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#000000"> 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 used vtkSplineFilter to distribute points evenly on this polyline.<br>But when i get the output from this filter, is like, at the junction point, 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-&gt;SetInputConnection(del-&gt;GetOutputPort());<br>contFilter-&gt;GenerateValues(1, -8.5, -8.5);<br>contFilter-&gt;Update();<br><br>vtkSplineFilter *sf = vtkSplineFilter::New();<br>sf-&gt;SetInputConnection(contFilter-&gt;GetOutputPort());<br>
sf-&gt;SetSubdivideToLength();<br>sf-&gt;SetLength(50);<br><br>vtkStripper *stp = vtkStripper::New();<br>stp-&gt;S
 etInputConnection( sf-&gt;GetOutputPort());<br>stp-&gt;Update();<br><br>Later I extract a polyline from vtkStripper as shown in<br>example below:<br></font><pre><font color="#000000"><a target=\"_blank\" href="http://vtk.org/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxx" target="\&quot;_blank\&quot;">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>
</font></pre><font color="#000000"><br> 
<br>_______________________________________________<br>
Powered by <a target=\"_blank\" href="http://www.kitware.com" target="\&quot;_blank\&quot;">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a target=\"_blank\" href="http://www.kitware.com/opensource/opensource.html" target="\&quot;_blank\&quot;">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK_FAQ" target="\&quot;_blank\&quot;">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="\&quot;_blank\&quot;">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></font></blockquote></div><br>
</rakeshthp@in.com></blockquote>