[Insight-users] CenteredAffineTransform and
DeformableRegistration6
Luis Ibanez
luis.ibanez at kitware.com
Wed Nov 24 15:37:00 EST 2004
Hi Jim,
As the previous email said:
>> 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.
>>
Please update your CVS checkout of ITK.
If you are not using CVS,
you can also get the files through the Win-CVS portal:
http://www.itk.org/cgi-bin/viewcvs.cgi/?cvsroot=Insight
in particular in the directory
http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/Registration/?root=Insight
The two files in question are:
http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/Registration/DeformableRegistration7.cxx?rev=1.3&root=Insight&view=log
http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/Registration/DeformableRegistration8.cxx?rev=1.3&root=Insight&view=log
Regards,
Luis
----------------
Jim wrote:
> Hi Luis,
>
> I have search the whole folder of Insight. I see only
> DeformableRegistration1.cxx-DeformableRegistration6.cxx. Where can I
> find the DeformableRegistration7.cxx and DeformableRegistration8.cxx?
>
> Thanks,
>
> Jim
>
> On Wed, 24 Nov 2004 00:23:49 -0500, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>>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
>>
>>_______________________________________________
>>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