And the code !<div>(Sorry for the noise)<br><br><div class="gmail_quote">On Thu, Mar 3, 2011 at 16:39, Simon ESNEAULT <span dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com">simon.esneault@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">And here is the image.<div>Thanks.</div><div><br></div><div><font color="#888888">Simon</font><div><div></div><div class="h5">

<br><br><div class="gmail_quote">On Thu, Mar 3, 2011 at 16:38, Simon ESNEAULT <span dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><div>Hi all and Nicholas,</div><div>


<br>
</div><div>First of all, thanks for your work on ITK.</div><div><br></div><div>I&#39;m trying to use itk::BSplineScatteredDataPointSetToImageFilter in order to reduce the number of point defining a spline.</div><div>Following that example : <a href="http://www.insight-journal.org/browse/publication/57" style="color:rgb(51, 51, 204)" target="_blank">http://www.insight-journal.org/browse/publication/57</a> and the itkBSplineScatteredDataPointSetToImageFilterTest2.cxx I was able to fit a new spline on the points of the input spline, and ask for fewer control point. It works quite well, but there are some strange artifacts at the beginning and the end of the spline, as one can see int the attached screenshot (from Paraview)</div>





<div><br></div><div>Maybe the algorithm is trying to generate a closed spline although we asked for a &quot;not closed one&quot; with the SetCloseDimension() method. </div><div><br></div><div>Any idea ? Or maybe there is a simpler way to do that, I&#39;ve tried to use itk::NonUniformBSpline without success</div>





<div><br></div><div>Attached is the c++ code that I used, and 4 vtk files : the vtk input and output splines and control points (glyphed with some sphere). The input is in white and the output is in red </div><div><br></div>





<div>Thanks</div><div>-Simon</div></span><br>-- <br>------------------------------------------------------------------<br><font color="#888888">Simon Esneault - Therenva<br>Centre d&#39;Innovation Technologique<br>Centre Cardio-Pneumologique<br>





CHU Pontchaillou<br>Rennes, France<br>Tel : +33 (0)6 64 61 30 94<br>Mail : <a href="mailto:simon.esneault@therenva.com" target="_blank">simon.esneault@therenva.com</a><br>------------------------------------------------------------------<br>






</font></blockquote></div><br><br clear="all"><br>-- <br>------------------------------------------------------------------<br>Simon Esneault - Therenva<br>Centre d&#39;Innovation Technologique<br>Centre Cardio-Pneumologique<br>


CHU Pontchaillou<br>Rennes, France<br>Tel : +33 (0)6 64 61 30 94<br>Mail : <a href="mailto:simon.esneault@therenva.com" target="_blank">simon.esneault@therenva.com</a><br>------------------------------------------------------------------<br>



</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>------------------------------------------------------------------<br>Simon Esneault - Therenva<br>Centre d&#39;Innovation Technologique<br>Centre Cardio-Pneumologique<br>

CHU Pontchaillou<br>Rennes, France<br>Tel : +33 (0)6 64 61 30 94<br>Mail : <a href="mailto:simon.esneault@therenva.com">simon.esneault@therenva.com</a><br>------------------------------------------------------------------<br>


</div>