# SimpleITK Bspline image representation

**URL:** <https://discourse.itk.org/t/simpleitk-bspline-image-representation/3170>\
**Category:** Uncategorized\
**Created:** [June 11, 2020, 8:58pm UTC](https://discourse.itk.org/t/simpleitk-bspline-image-representation/3170 "2020-06-11T20:58:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibr](https://discourse.itk.org/user_avatar/discourse.itk.org/ibr/32/468_2.png) [@ibr](https://discourse.itk.org/u/ibr)\
**Post date:** [June 11, 2020, 8:58pm UTC](https://discourse.itk.org/t/simpleitk-bspline-image-representation/3170/1 "2020-06-11T20:58:00Z")

</div>

Dear all,  
I am trying to understand this paper [1] about B-spline. Is there a SimpleITK example to get a B-Spline representation of an image?  
Thanks in advance!

[1] [Splines - A perfect fit for signal and image processing  
 ](http://bigwww.epfl.ch/publications/unser9902.pdf)

---

<div class="post-metadata">

**Author:** ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)\
**Post date:** [June 11, 2020, 9:03pm UTC](https://discourse.itk.org/t/simpleitk-bspline-image-representation/3170/2 "2020-06-11T21:03:27Z")

</div>

Hello @ibr,

The link to the paper you refer to is missing so not sure what it is you are looking for. If you are asking about B-spline based registration we [have a notebook for that](https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks/blob/master/Python/65_Registration_FFD.ipynb). If this is something else, please post the paper details so we’ll know what it is you want.

---

<div class="post-metadata">

**Author:** ![ibr](https://discourse.itk.org/user_avatar/discourse.itk.org/ibr/32/468_2.png) [@ibr](https://discourse.itk.org/u/ibr)\
**Post date:** [June 11, 2020, 10:45pm UTC](https://discourse.itk.org/t/simpleitk-bspline-image-representation/3170/3 "2020-06-11T22:45:21Z")

</div>

@zivy

Thanks for your quick response and sorry for forgetting adding the link to the paper. I just updated the post and added a link to the paper. It is a popular paper by Unser. I am planning to study it and try to create a notebook tutorial out of it.

The notebook example you added looks interesting but I think it is about image registration. For now, I am interested to know:

- how to compute the B-Spline control points of an image?
- how to use these control points to re-create the image?
- how to get the image derivative using the B-spline representation?

---

<div class="post-metadata">

**Author:** ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)\
**Post date:** [June 11, 2020, 11:08pm UTC](https://discourse.itk.org/t/simpleitk-bspline-image-representation/3170/4 "2020-06-11T23:08:55Z")

</div>

Hello @ibr,

Got it, that notebook has nothing to do with what you want.

In SimpleITK we only exposed the option of [BSpline interpolation](https://simpleitk.org/doxygen/latest/html/namespaceitk_1_1simple.html#a7cb1ef8bd02c669c02ea2f9f5aa374e5) as a constant to the [ResampleImageFilter](https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1ResampleImageFilter.html#details). This is based on the work of Unser and others as documented in the original [ITK BSplineInterpolateImageFunction class](https://itk.org/Doxygen/html/classitk_1_1BSplineInterpolateImageFunction.html). We do not expose the functionality that you want as it is not “Simple” and SimpleITK is a simplified interface.

For what you are looking you should go to ITK (not sure that it provides the image derivative using the B-spline representation, but the ITK code should be a good start).
