[Insight-users] itkBSplineScatteredDataPointSetToImageFilter
Nicholas Tustison
ntustison at gmail.com
Thu Mar 3 21:30:09 EST 2011
Hi Simon,
It looks like you're rendering the control points instead of the sampled spline.
Instead of rendering the control points by iterating through the output of
GetPhiLattice(), you should generate the output image and plot the sampled
B-spline curve by iterating through GetOutput().
Let me know what that gets you.
Nick
On Mar 3, 2011, at 10:40 AM, Simon ESNEAULT wrote:
> And the code !
> (Sorry for the noise)
>
> On Thu, Mar 3, 2011 at 16:39, Simon ESNEAULT <simon.esneault at gmail.com> wrote:
> And here is the image.
> Thanks.
>
> Simon
>
>
> On Thu, Mar 3, 2011 at 16:38, Simon ESNEAULT <simon.esneault at gmail.com> wrote:
> Hi all and Nicholas,
>
> First of all, thanks for your work on ITK.
>
> I'm trying to use itk::BSplineScatteredDataPointSetToImageFilter in order to reduce the number of point defining a spline.
> Following that example : http://www.insight-journal.org/browse/publication/57 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)
>
> Maybe the algorithm is trying to generate a closed spline although we asked for a "not closed one" with the SetCloseDimension() method.
>
> Any idea ? Or maybe there is a simpler way to do that, I've tried to use itk::NonUniformBSpline without success
>
> 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
>
> Thanks
> -Simon
>
> --
> ------------------------------------------------------------------
> Simon Esneault - Therenva
> Centre d'Innovation Technologique
> Centre Cardio-Pneumologique
> CHU Pontchaillou
> Rennes, France
> Tel : +33 (0)6 64 61 30 94
> Mail : simon.esneault at therenva.com
> ------------------------------------------------------------------
>
>
>
> --
> ------------------------------------------------------------------
> Simon Esneault - Therenva
> Centre d'Innovation Technologique
> Centre Cardio-Pneumologique
> CHU Pontchaillou
> Rennes, France
> Tel : +33 (0)6 64 61 30 94
> Mail : simon.esneault at therenva.com
> ------------------------------------------------------------------
>
>
>
> --
> ------------------------------------------------------------------
> Simon Esneault - Therenva
> Centre d'Innovation Technologique
> Centre Cardio-Pneumologique
> CHU Pontchaillou
> Rennes, France
> Tel : +33 (0)6 64 61 30 94
> Mail : simon.esneault at therenva.com
> ------------------------------------------------------------------
> <Spline-Interpolator-test.cpp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110303/81b1dbaa/attachment.htm>
More information about the Insight-users
mailing list