vtkSplineFilter proposes two different ways of resampling:<br>- either you use SetSubdivideToLength -what you are doing right now- and the SplineFilter will output Lines that are almost evenly distributed with a sampling step of Length that you set by SetLength<br>
- or you use SetSubdivideToSpecified, and you set the number of points that you want in the output. Well, I just saw that &quot;points&quot; is not the right term. Use SetNumberOfSubdivisions.<br><br>HTH<br><br>Jerome<br>
<br><div class="gmail_quote">2010/2/2 Rakesh Patil <span dir="ltr">&lt;<a href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 <br><br><blockquote>Well,<br><br>I didn&#39;t get the meaning of this <br><div class="im"><br>&quot;but you have to set the number of points of the output.&quot;<br><br></div>To which object do we need to set the number of points of output?<br>
Thanks<div><div></div><div class="h5"><br><br>---------- Original message ----------<br>From:=?ISO-8859-1?B?Suly9G1l?=&lt; <a href="mailto:jerome.velut@gmail.com" target="_blank">jerome.velut@gmail.com</a> &gt;<br>Date: 02 Feb 10 14:50:56<br>
Subject:  Re: [vtkusers] vtkSplineFilter not distributing points evenly...<br>To: Rakesh Patil <br><br>Hi Rakesh,<br><br>I think that the &quot;SetSubdivideToLength&quot; 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 href="mailto:rakeshthp@in.com" target="_blank">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 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>

</font></pre><font color="#000000"><br> 
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a 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 href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></font></blockquote></div><br>
</div></div></blockquote> 
</blockquote></div><br>