[Insight-users] registration of gray matters

Luis Ibanez luis.ibanez at kitware.com
Thu Dec 8 12:32:07 EST 2005


Hi Marc,

The KappaStatistics metric should not be slower than any of the
GrayLevel metrics such as MeanSquares.  Note that for comparing
the computation time of Metric, you should only count how much
time it takes to compute:

                      GetValue()

in each one of the Metrics.


The selection of the Optimizer, on the other hand, will have a more
dramatic effect on the total time required for completing the 
registration. In particula because different optimizers require to
comput Metric->GetValue() different times per Iteration.


So at the end, you must take into account:


   1) How many Optimizer iterations you need for converging.

   2) How many Metric evaluations does the optimizer need
      per iteration.

   3) How much time it takes to compute each Metric iteration.


In your particular case, the One Plus One optimizer is very
demanding on the number of Metric evaluation that are needed
per iteration. So that is probably where most of the difference
in total computation time is being originated.


You may want to replace the optimizer with the AmoebaOptimizer

http://www.itk.org/Insight/Doxygen/html/classitk_1_1AmoebaOptimizer.html

That is another optimizer that does not require the Metrics
to provide derivatives.


The use of this Optimizer is illustrated in the ITK Software Guide

           http://www.itk.org/ItkSoftwareGuide.pdf

in the same section where the MatchCardinality metric is used.

This is Section 8.11.1 "Registration using Match Cardinality metric"
in pdf-pages 461-463.


Once you get your registration to work, you should consider
to post your experiences as a paper to the Insight Journal

  http://www.insightsoftwareconsortium.org/InsightJournal/

Remember that the Insight Journal is not a typical Reputation-Based
Journal, instead it s a repository of techincal reports that enforce
reproducibility.




    Regards,



        Luis




----------------
Marc Ruiz wrote:
> Hi!
> 
>  
> 
> I am trying to readapt the program changing the metric 
> mattesmutualinformation to kappastatisticimagetoimagemetric. Because of 
> this, I think that I have to change some parameters from the optimizers 
> that I used before. The pipeline is the following:
> 
>  
> 
> 1. versor rigid transform without initialization using 
> oneplusoneevolutionaryoptimizer.
> 
>  
> 
> 2. versor rigid transform with intitialization using the output of step 
> number 1. It uses versorrigid3dtransformoptimizer
> 
>  
> 
> 3. affine transform with regularstepgradientdescentoptimizer initialize 
> using the output of step 2.
> 
>  
> 
> All the interpolators are nearest neigbour because I am using labeled 
> images. And now, the metric is kappastatisticimagetoimagemetric.
> 
>  
> 
> So, the questions are:
> 
>  
> 
> 1) It is normal that only changing the metric the program it is much 
> more time consuming? (before it was faster... now it takes a lot of time)
> 
>  
> 
> 2) The solution for the time consuming is change the optimizers 
> parameters? (I make some modification but they didn't work...) Or it is 
> change some of the optimizers?  About step number one for example what 
> should be a good election for number of iterations and the 
> initialization of radius, grow and shrink...?
> 
> (The binary images are 256x256x174 ( 0.85,0.96,0.96))
> 
>  
> 
> Thank you in advance!
> 
>  
> 
> MaRC//
> 
> 
> 
> On 12/7/05, *Luis Ibanez* <luis.ibanez at kitware.com 
> <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
>     Hi Marc,
> 
> 
>     1) When you started registering binary images,
>        Did you changed the Image Metric  ?
> 
>        You probably should use a metric such as the
> 
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1KappaStatisticImageToImageMetric.html
>     <http://www.itk.org/Insight/Doxygen/html/classitk_1_1KappaStatisticImageToImageMetric.html>
> 
>        or the
> 
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1MatchCardinalityImageToImageMetric.html
>     <http://www.itk.org/Insight/Doxygen/html/classitk_1_1MatchCardinalityImageToImageMetric.html>
> 
>        that are intended for binary (or labeled) images.
> 
> 
> 
>     2) Did you changed the interpolator ?
> 
>        Once you use binary images you should only use
>        a Nearest Neighbor interpolator.
> 
> 
> 
> 
>     In any case,
>     I would suggest you that instead of registering the masks,
>     you could use the Masks in order to restrict the registration
>     method to use only the pixels in the Gray matter.
> 
> 
>     Please read the ITK Software Guide
> 
>              http://www.itk.org/ItkSoftwareGuide.pdf
> 
>     In particular Section 8.11.3:
> 
>     "Registration using masks constructed with Spatial objects"
> 
>     in pdf-page 464.
> 
> 
> 
>     The associated source code example can be found in
> 
>              Insight/Examples/Registration/
>                          ImageRegistration12.cxx
> 
> 
> 
>     Note that, depending on the ImageMetric that you are using,
>     you may want to extend (dilate) the Masks a bit in order to
>     make sure that a band of pixels *outside* of the gray matter
>     is also participating in the registration.  The reason why
>     you need those pixels is that they will help to make your
>     metric degrade when the two images are not well aligned.
> 
> 
> 
>       Regards,
> 
> 
> 
>          Luis
> 
> 
> 
>     ---------------
>     Marc Ruiz wrote:
>      > Hi!
>      >
>      >
>      >
>      > I have registered two MRIs. The registration pipeline is first
>     rigid and
>      > then affine, and the results are ok.
>      >
>      >
>      >
>      > But now I would try to register only the gray matter of these two
>      > images, because I am only interested in the registration of the
>     cortex.
>      > So, I have segmented the 2 images and now I am trying to do the same
>      > registration (rigid and affine) with two binary MRIs and with the
>     same
>      > program and parameters.
>      >
>      >
>      >
>      > The problem is that now I get the output image all white.
>      >
>      >
>      >
>      > First I thought it was only problem of the writer of the output image
>      > (the interpolation of the resample filter or something like that,
>     due to
>      > the output is a binary image too), but I have applied the same
>      > transformation (the one obtained from the registration of two gray
>      > matters) to a MRI and the transformation is bad done. So, I think
>     it is
>      > problem of the registration…
>      >
>      >
>      >
>      > So, some idea about the problem??
>      >
>      > 1) I have to change some parameters or the interpolation or…?
>      > 2)  Which differences I have to think about to readapt the program?
>      > 3)  Or some idea to register ok the gray matter?
>      >
>      > Thank you!!
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Insight-users mailing list
>      > Insight-users at itk.org <mailto:Insight-users at itk.org>
>      > http://www.itk.org/mailman/listinfo/insight-users
> 
> 



More information about the Insight-users mailing list