<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Simon,<div><br></div><div>It looks like you're rendering the control points instead of the sampled spline.</div><div>Instead of rendering the control points by iterating through the output of </div><div>GetPhiLattice(), you should generate the output image and plot the sampled</div><div>B-spline curve by iterating through GetOutput().</div><div><br></div><div>Let me know what that gets you.</div><div><br></div><div>Nick</div><div><br></div><div><br></div><div><br><div><div>On Mar 3, 2011, at 10:40 AM, Simon ESNEAULT wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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"><<a href="mailto:simon.esneault@gmail.com">simon.esneault@gmail.com</a>></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"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></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'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 "not closed one" with the SetCloseDimension() method. </div><div><br></div><div>Any idea ? Or maybe there is a simpler way to do that, I'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'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'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'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>
<span><Spline-Interpolator-test.cpp></span></blockquote></div><br></div></body></html>