[Insight-users] how to calculate displacement from B-Spline parameters

pinpress sb_ji at yahoo.com
Wed Oct 29 10:30:22 EDT 2008


Thanks, Marius.

I believe that the example code DeformableRegistration15.cxx did exactly
what you have suggested. Basically, it transforms a fixed point to get the
location of the corresponding moving point, and explicitly calculate the
displacement vector. This is also what I did. However, the displacement
field just does not make sense to me at all.

Please let me illustrate by proving a test case. I have uploaded the fixed
image, moving image (by dilating the fixed image), and applied the BS
registration as well as the LevelSet registration (example code from
DeformableRegistration5.cxx). The output images from the BS and LS
registrations are overlaid with the displacement vectors generated from the
explicit deformation field. (BS registration was performed with either
Affine registration as a preprocessing, or BS only by setting the proper #
of iterations.) As you can see, both BS and LS registrations gave comparable
output image, both similar to the fixed image. However, the displacement
vectors generated from LS makes a lot sense, whereas those from BS
registration do not make sense at all. 

What's interesting also is that the displacement vectors from BS
registration seem also dependent on whether affine registration is performed
or not. But shouldn't the bulk transform that takes care of the global
motion also be included in the overall transformation when transforming a
fixed point into its moving space?

I appreciate if anyone could enlighten me what is going on here. I have
spent a lot of time but just wasn't able to figure out why or what is wrong.
thanks a million!

(BTW, it's the first time uploading a file. I hope they work.)

http://www.nabble.com/file/p20228316/fixed.png fixed.png 
http://www.nabble.com/file/p20228316/moving.png moving.png 
http://www.nabble.com/file/p20228316/output_Affine_and_BS.png
output_Affine_and_BS.png 
http://www.nabble.com/file/p20228316/output_BSOnly.png output_BSOnly.png 
http://www.nabble.com/file/p20228316/output_LS.png output_LS.png 



Hi Pinpress,

you can compute the displacement of a point x by calling the
TransformPoint() function from the B-spline transform:

PointType x, y, displacement;
// you fill it with whatever point you are interested in
y = bSplineTransform->TransformPoint( x );
displacement = y - x;

In case you want to compute these things afterwards, you will have to
store all information that defines a BSplineDeformableTransform. That is
not only the parameters, but also information about the grid:
GridRegion, GridSpacing, GridOrigin, GridDirection. And of course the
BulkTransform, the dimension of your data, and the spline order. Then
the simplest thing to do is create a new BSplineDeformableTransform and
feed all this data to it, then call the TransformPoint() again.

Hope this helps,

Marius Staring
-- 
View this message in context: http://www.nabble.com/how-to-calculate-displacement-from-B-Spline-parameters-tp20220125p20228316.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list