[Insight-users] 3d Deformable Registration problem based on DeformableRegistration8

Albert Gubern bertkrek at gmail.com
Fri May 15 10:32:44 EDT 2009


Hi again,

I've changed my code using RegularStepGradientDescentOptimizer instead of
LBFGSBOptimizer.

Using brain phantom volume, I had good visual results (the moving image is
transformed looking like fixed image) with LBFGSBOptimizer, and the final
value of the metric was  -0.836697.

Starting Registration
0   -0.580566   0 0
0   -0.580643   0 0
0   -0.583835   0 0
0   -0.583835   0.000114794 0
1   -0.598343   0.000114794 0
1   -0.598343   7.34998e-05 0
2   -0.617556   7.34998e-05 0
2   -0.617556   0.000133695 0
(...)
83   -0.836697   0.000103487 0
83   -0.836697   0.000103487 0
83   -0.836686   0.000103487 0
83   -0.836697   0.000103487 0
83   -0.836697   0.000103487 0
83   -0.836686   0.000103487 0
83   -0.836697   0.000103487 0
83   -0.836697   0.000103487 0

On the other hand, using RegularStepGradientDescentOptimizer the final value
of the metric with 800 iterations is -0.638617 and the resampled image is
not good and only is deformed in their first and last slices. With MRI
prostate volume I had the same problem: the transformation only deforms the
first and the last slice of the volume.

 Starting Registration
0   -0.580566
1   -0.57976
2   -0.579975
3   -0.579813
4   -0.580218
5   -0.580442
(...)
793   -0.637725
794   -0.637952
795   -0.637915
796   -0.637942
797   -0.638316
798   -0.637498
799   -0.638617

I've set the stepLength of the optimizer but I haven't achieved better
metric values progress in each step of the registration. Also, I don't
understand why the output image only is transformed in the first and the
last slice.

So, having in consideration that with  LBFGSBOptimizer I have good results
registering the brain phantom volume, I would like to know how can I tune
this optimizer in order to work with MRI prostate images.

If we need more information about my code, don't doubt to ask me.

Thanks.

Albert

2009/5/12 Luis Ibanez <luis.ibanez at kitware.com>

> Hi Albert,
>
> It turned out in practice that the LBFGSBOptimizer is not as superior
> as it may have been assumed.
>
> Lately we have simply used the RegularStepGradientDescentOptimizer
> with reasonable results.
>
> See for example:
>
>     Insight/Examples/Registration/DeformableRegistration15.cxx
>
> In general,
> any claims saying than some component is
>
>                              "The Best"
>
> should be taken with a lot of suspicion.
>
>
> Such claims are good only for publishing papers in traditional
> Journals and Conferences that do not exercise reproducibility.
> You can not rely on such sources when you are working on
> serious applications.
>
>
> Don't hesitate to experiment with other components of the
> registration framework.
>
> In many cases, the challenge is not so much about what components
> to use, but about how to fine-tune their parameters for the problem
> at hand.
>
>
> Please let us know what you find,
>
>
>     Thanks
>
>
>          Luis
>
>
> -------------------------
> On Tue, May 12, 2009 at 11:21 AM, Albert Gubern <bertkrek at gmail.com>
> wrote:
> > Hi,
> >
> > I've modified the example DeformableRegistration8.cxx in order to do a 3D
> > DeformableRegistration. This example uses MattesMutualInformationMetric,
> > BSplineDeformableTransform and LBFGSBOptimizer.
> >
> > I tested the code with a brain phantom generated with Matlab. The
> original
> > volume is deformed using Matlab b-spline deformation based on this
> routine
> > http://www.mathworks.com/matlabcentral/fileexchange/20057, and I want to
> use
> > the deformable registration of ITK to recover the deformation. The next
> link
> > shows two checkerboard of one slice, before and after the succesful
> > registration:
> > http://img140.imageshack.us/img140/1831/phantomdeformableregist.png. The
> > original volume is set as the fixed image and the deformed phantom as the
> > moving.
> > - Mostra el text citat -
> >
> > The output of the execution is:
> >
> > Starting Registration
> > 0   -0.579387   0 0
> > 0   -0.581355   0 0
> > 0   -0.584345   0 0
> > 0   -0.584345   6.33911e-05 0
> > 1   -0.603649   6.33911e-05 0
> > 1   -0.603649   6.41689e-05 0
> > 2   -0.624884   6.41689e-05 0
> > 2   -0.624884   7.76054e-05 0
> > 3   -0.638071   7.76054e-05 0
> > 3   -0.638071   6.32524e-05 0
> > 4   -0.655438   6.32524e-05 0
> > 4   -0.655438   7.51525e-05 0
> > 5   -0.677776   7.51525e-05 0
> > 5   -0.677776   6.37494e-05 0
> > 6   -0.696669   6.37494e-05 0
> > 6   -0.696669   5.09743e-05 0
> > 7   -0.713613   5.09743e-05 0
> > 7   -0.713613   5.48518e-05 0
> > ... (60 iterations more)
> > 67   -0.854863   4.01611e-05 0
> > 67   -0.854863   4.01611e-05 0
> > 67   -0.854863   4.01611e-05 0
> > 67   -0.854863   4.01611e-05 0
> >          Probe Tag    Starts    Stops             Time (s)
> >        Registration           1            1           3289.35
> >
> > Next step was to test the same code with prostate MRI images but the
> > registration doesn't work. The original volume is a central region of MRI
> to
> > focus the registration on the prostate
> > (http://img145.imageshack.us/img145/200/mrireal.png), and the same
> > deformation, that was applied to the phantom test, is used to deform the
> > original prostate. The goal of the registration is the same: recovering
> the
> > deformation. The next link is a checkerboard of one slice of the volume
> to
> > show that fixed and moving images look different enough
> > (http://img26.imageshack.us/img26/8905/im011.png).
> >
> > In this test the program the registration stops too early doing only few
> > iterations and the InfinityNormOfProjectedGradient is always zero:
> >
> > Starting Registration
> > 0   -0.742878   0 0
> > 0   -0.722791   0 0
> > 0   -0.721167   0 0
> > 0   -0.721134   0 0
> > 0   -0.733701   0 0
> > 0   -0.733701   0 0
> > 0   -0.742878   0 0
> > 0   -0.742878   0.000122748 0
> >          Probe Tag    Starts    Stops             Time (s)
> >        Registration           1            1           97.3459
> >
> > I have tested the registration using different values of bins
> > (32,64,100,etc), % samples (100, 50, ...), using the original
> > (0.46875,0.46875,0.46875) and the unitary spacing, different number of
> grids
> > (from 5 to 50) and the parameters of the LBFGSBOptimizer are the
> following:
> >
> >  double costFunctionconvergenceFactor = 1.e7;
> >  double projectedGradientTolerance = 1e-6;
> >  int maxNumberOfIterations = 500;
> >  int maxNumberOfEvaluations = 500 ;
> >  int maxNumberOfCorrections = 5;
> >
> > Among other tests, I've also changed the metric to MeanSquareMetric to
> know
> > if mattes mutual information metric is the problem or, separately, the
> fixed
> > and moving image have been binarized to reduce the information of each
> > image. The output has been the same.
> >
> > All the tests seem to show that the problem is the optimizer, but I don't
> > know how I can solve it because in some posts in the mailing list I've
> read
> > that it is the best optimizer for deformable registration. Should I
> change
> > it for another one (Regular or LBFGS)? Any other idea?
> >
> > Thanks in advance.
> >
> > Albert
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>



-- 
Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090515/7d29c624/attachment.htm>


More information about the Insight-users mailing list