[Insight-users] spline as a combination of b-splines

Nick Tustison ntustison at wustl.edu
Mon Jan 4 10:40:02 EST 2010


Hi Amy,

A couple things for consideration:

1)  Instead of modifying the itkBSpline…Filter that is currently in the
review directory, you could just download the
itkBSplineControlPointImageFilter class from the N4ITK contribution which
takes as input, a set of control points and evaluates the B-spline object
values, derivatives, etc.  I wrote it as a companion class to the original
scattered data approximation filter.

2) These classes assume uniform knot spacing where the parametric domain is
defined by the user-specified image domain.  Thus the user does not specify
the knot vectors as they are already implied by the assumptions of the
algorithm.

Let me know if you have any other questions/concerns,
Nick

On Mon, Jan 4, 2010 at 2:37 AM, Amy C <mathematical.coffee at gmail.com> wrote:

> Hi Luis,
>
> Thanks a lot for that, I had a look at the class and it does seem do what
> I'd like it to (and then some), so I might modify it to just do the
> evaluating & calculating of derivatives (I need the bspline object, but
> don't need it to approximate any data). After perusal of the code, I think
> my problem is to do with my understanding of B-splines. I thought I
> understood them, but I've become more and more confused as to exactly how
> many knots/control points are needed and where they should be placed. I'm
> going to do a bit more reading and then come back this question later.
>
> thanks for all the help,
> Amy
>
>
> On Mon, Jan 4, 2010 at 6:26 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
>
>> Hi Amy,
>>
>> There are several forms of BSplines in ITK.
>>
>> From your detailed description, it seems that the class:
>>
>>   Insight/Code/Review/
>>      itkBSplineScatteredDataPointSetToImageFilter.h
>>
>> provides the functionalities that you are looking for.
>>
>> This class is described in the following Insight Journal paper:
>> http://www.insight-journal.org/browse/publication/57
>>
>>
>> Please take a look and let us know what you think,
>>
>> Otherwise we could point you to other of the
>> BSpline implementations in ITK.
>>
>>
>>       Regards,
>>
>>
>>                 Luis
>>
>>
>> -------------------------------------------------------------
>> On Sun, Jan 3, 2010 at 2:41 AM, Amy C <mathematical.coffee at gmail.com>
>> wrote:
>> > Hello,
>> >
>> > I'm after some sort of B-spline class, but I'm not sure what to use.
>> > I have a spline that is a linear combination of cubic (uniform,
>> centered)
>> > b-splines, it maps from R^(image dimension) -> R.  ( spline[px] = sum(
>> > coefficient[px]*b-spline[px] ).
>> > In this case, instead of interpolating a set of numbers, I -know- the
>> > coefficients(/control points) and knots of the spline. More or less,
>> each
>> > pixel in the image contains a coefficient/control point (or every n
>> pixels,
>> > where n is an integer) and I'd like to evaluate the spline.
>> > I guess I just need some object with the following properties
>> > - set coefficients(/control points)
>> > - set knots ( or spacing? )
>> > - evaluate the spline at every pixel
>> > - calculate the derivative
>> > - will be used in a loop - will recalculate coefficients each loop
>> > - need to convolve the coefficient 'image' and possibly downsample every
>> now
>> > and then
>> >
>> > At first I thought of just using a normal array to hold the coefficients
>> > etc, but the last two points suggest I should use something within ITK.
>> I
>> > was thinking of making an object that is more or less an itk::Image (for
>> the
>> > coefficients) with an Evaluate/EvaluateDerivative method.
>> >
>> > Does anyone know of a class that does this already? (Set knots, set
>> > coefficients, evaluate both spline and derivatives, where the spline is
>> made
>> > up of bsplines?) BSplineInterpolateImageFunction seems closest, but it
>> > calculates coefficients to fit the input image, while I know the
>> > coefficients and just want to calculate the derivative/values.
>> >
>> > Thanks,
>> > Amy
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.html
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>> >
>>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100104/214a0905/attachment.htm>


More information about the Insight-users mailing list