[Insight-users] Antwort: problem, how to invert b-spline transform

matthias.honal at uniklinik-freiburg.de matthias.honal at uniklinik-freiburg.de
Wed Oct 15 04:45:24 EDT 2008


Hi Lars,

according to my knowledge, the GetInverse Method is not implemented for the
BSpline Transform, since it is not straight forward to invert such a
transform. I had the same problem some time ago, and I solved it by
computing an approximate inverse as follows:
- Generate the deformation field from the transform you have.
- Invert each single vector of the deformation field, i.e. vector v becomes
-v
- Now use the original transfrom to get from the fixed image to the
corresponding position in the moving image.
- At that position put the vector -v
- Now you have approximately the transform you need, except that that your
deformation vectors do not start on the pixel grid. Therefore regrid your
vectors to the pixel grid.

For regridding you might want to look at that paper from the Insight
Journal: http://hdl.handle.net/1926/140

And if my description is too confusing, maybe the description in that paper
is more helpful:
Honal et al., Retrospective Breathing Motion Compensation for MRI with
Continuously Moving Table.
Proceedings of the SPIE Medical Imaging; 2008; San Diego. p 69130G.



                                                                           
             "Hegenbart, Lars"                                             
             <Lars.Hegenbart at h                                             
             s.fzk.de>                                                  An 
             Gesendet von:               <insight-users at itk.org>           
             insight-users-bou                                       Kopie 
             nces at itk.org                                                  
                                                                     Thema 
                                         [Insight-users] problem, how to   
             14.10.2008 17:28            invert b-spline transform         
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Dear ITK-community,

I am having trouble inverting a B-Spline-Transform.

The B-Spline-Transform "transform3" was set up before and works fine so
far. Now I want to compute the inverse transformation of it. The name I
choose is "transform3i":

             TransformType3::Pointer transform3i;
             transform3i = TransformType3::New(); // BSpline

             transform3i->SetGridSpacing(transform3->GetGridSpacing());
             transform3i->SetGridOrigin(transform3->GetGridOrigin());
             transform3i->SetGridRegion(transform3->GetGridRegion());

             typedef TransformType3::ParametersType ParametersType_bspline;
             const unsigned int numberOfParameters_bspline =
transform3i->GetNumberOfParameters();
             ParametersType_bspline
parameters_bspline(numberOfParameters_bspline);
             parameters_bspline.Fill( 0.0);
             transform3i->SetParameters(parameters_bspline);

             transform3->GetInverse(transform3i);

The problem now is: "transform3i"'s parameters contains only zeros,
which cannot be, since "transform3" has parameters not equal to zero.

Somehow "GetInverse" does not work for B-Splines. I successfully tested
it for affine transformation (same code, without the SetGrid-stuff,
setting just the Identity with "SetIdentity"). The affine inverse
transform can be calculated.

Any ideas?

Thanks for any hints in advance!

Best regards
Lars

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users






More information about the Insight-users mailing list