[Insight-users] CenteredAffineTransform and DeformableRegistration6

Luis Ibanez luis.ibanez at kitware.com
Wed Nov 24 00:23:49 EST 2004


Hi Alexandra,

This topic has been discussed recently in the list,
please look at the archives of November and October

http://www.itk.org/pipermail/insight-users/2004-November/date.html
http://www.itk.org/pipermail/insight-users/2004-October/date.html


The LBFGSOptimizer used in this example has the particularity
of misbehaving when you initialize it in the extrema of the
cost function.

In other words, it will *not* work if you start with two
images that are *already* registered.




1) Regarding the convertion to 3D,
    you may want to look at the example

        Insight/Code/Registration/
                  DeformableRegistration7.cxx

    that is *already* customized for 3D images.





2) Regarding the LBFGS optimizer, you may want  to try
    its variant, the LBFGSB (note the "B" at the end),
    that is illustrated in the example

        Insight/Code/Registration/
                  DeformableRegistration8.cxx

    Still, you don't want to feed it with two registered
    images. Try to provide at least some slight missregistration
    so the optimizer can compute a gradient and survide to the
    first iteration.




These two examples were added recently as a result of the
discussions that you will find in the archives of the
mailing list. Therefore, in order to get the code you should
get an updated CVS checkout of the toolkit.



   Regards,



     Luis




-----------------------
Alexandra Badea wrote:

> Greetings!
> After a break I decided to come back to itk registration. I have used 
> DeformableRegistration6 in the past, initialized with a transformed 
> obtained from AIR (Woods, 1998). It proved to be a lengthy process (even 
> for just a reduced volume) and I think about ways to reduce the 
> computing time.
> My images are 128x128x256 pixels.
> 
> I wanted to initialize my transform (by feeding images already 
> registered) with a 3D centered affine transform.
> To my surprise ImageRegistration9 run fine for a 2D example but if I 
> change the dimension to 3 it doesn't seem to work. The program aborts 
> after giving an initial estimate for the transform.
> I thought that the way to do it is modify ImageRegistration9 and just 
> changed the dimension from 2 to 3 in line 123.
> const unsigned int Dimension = 3;
> 
> [ithaka:itk1.8/alex/build] alex% 
> /Users/alex/software/itk1.8/alex/build/CenteredAffine3d 
> /Users/alex/voxstation/alxbrains/N18977/recon/rHippocampus.hdr 
> /Users/alex/voxstation/alxbrains/N19101/recon/rHippocampus.hdr 
> /Users/alex/software/itk/alex/data/reg3d.hdr
> Initial Transform Parameters
> [1, 0, 0, 0, 1, 0, 0, 0, 1, 5.47948, 4.84506, 11.925, -0.102522, 
> 0.0548602, 0.350592]
> 0 5.30472e+06 [1, 0, 0, 0, 1, 0, 0, 0, nan, 5.47948, 4.84506, 11.925, 
> -0.102522, nan, nan]
> 
> 
> /Users/alex/software/itk1.8/InsightToolkit-1.8.0/Utilities/vxl/core/vnl/vnl_matrix.txx: 
> 1151: matrix has non-finite elements
> /Users/alex/software/itk1.8/InsightToolkit-1.8.0/Utilities/vxl/core/vnl/vnl_matrix.txx: 
> here it is:
> 1 0 0
> 0 1 0
> 0 0 nan
> /Users/alex/software/itk1.8/InsightToolkit-1.8.0/Utilities/vxl/core/vnl/vnl_matrix.txx: 
> calling abort()
> Abort
> [ithaka:itk1.8/alex/build] alex%
> 
> 
> If I try to register an image to itself I get the following error:
> 
> [ithaka:itk1.8/alex/build] alex% 
> /Users/alex/software/itk1.8/alex/build/CenteredAffine3d 
> /Users/alex/voxstation/alxbrains/N18977/recon/rHippocampus.hdr 
> /Users/alex/voxstation/alxbrains/N18977/recon/rHippocampus.hdr 
> /Users/alex/software/itk/alex/data/selfreg
> Initial Transform Parameters
> [1, 0, 0, 0, 1, 0, 0, 0, 1, 5.47948, 4.84506, 11.925, 0, 0, 0]
> 0 0 [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, 
> nan, nan]
> 
> 
> /Users/alex/software/itk1.8/InsightToolkit-1.8.0/Utilities/vxl/core/vnl/vnl_matrix.txx: 
> 1151: matrix has non-finite elements
> /Users/alex/software/itk1.8/InsightToolkit-1.8.0/Utilities/vxl/core/vnl/vnl_matrix.txx: 
> here it is:
> nan nan nan
> nan nan nan
> nan nan nan
> /Users/alex/software/itk1.8/InsightToolkit-1.8.0/Utilities/vxl/core/vnl/vnl_matrix.txx: 
> calling abort()
> Abort
> 
> I have the feeling that I am doing something very wrong. Can anyone help 
> me identify what it is?
> Also has anybody tried the DeformableRegistration6 with images of this 
> size 128x128x256 and can estimate a reasonable computing time? My images 
> are very simple in fact and I could use a reduced volume around my 
> hippocampus, I also have two gray values only (255 for hippocampus, 0 
> for the background).
> 
> Many thanks,
> Alexandra
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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