[Insight-users] Helo with bspline/mutual information/gradient descent

Luis Ibanez luis.ibanez at kitware.com
Sat Aug 8 23:12:17 EDT 2009


Hi J.X.J.

If the Metric is oscillating, this may be a symptom that your optimizer
is taking jumps that are too large.

I usually plot the metric values by using GNUPlot, but you could do the
same with the spreadsheet of OpenOffice, or even with Excel.

---

About the compilation error,  please post also the sentence that
follows the one that you posted. The next sentence to that one
tells what the problem is.


     Thanks


            Luis


----------------------
On Sat, Aug 8, 2009 at 7:45 PM, J.X.J. <wat.a.phony at gmail.com> wrote:

>
> Hi Luis,
>
> thanks for your reply. I have added an observe to the code, the metric
> value
> output seems to oscillate rather than a general increase for decrease in
> value. How do you plot the metric values? Is there a way to output the
> metric value of each iteration into a text or similar file and I could use
> MATLAB to plot it, or is there a way to do that directly from ITK?
>
> Also I've noticed that using Viola and Wells MI is REALLY slow when coupled
> with BSpline Deformable Transform. I've tried using Mattes MI which is much
> much faster in comparison in the order of 5-10 fold, why is that the case?
>
> And finally (I'm sorry for all the questions, programming in C is not my
> forte), I tried using Levenberg Marquardt Optimizer but I get this error
> but
> I compile the code: error C2664:
> 'itk::ImageRegistrationMethod<TFixedImage,TMovingImage>::SetOptimizer' :
> cannot convert parameter 1 from 'itk::LevenbergMarquardtOptimizer::Pointer'
> to 'itk::ImageRegistrationMethod<TFixedImage,TMovingImage>::OptimizerType
> *'
>
> Any help is appreciated
> J.X.J.
>
>
> Luis Ibanez wrote:
> >
> > Hi J.X.J.
> >
> > The first thing that you want to do is to instantiate a Command/Observer
> > and to print out the values of the Metric at every iteration of the
> > optimizer.
> >
> > Plot this values and/or send the output to the mailing list.
> >
> > From the progression of the metric values it will be possible to
> determine
> > if parameters of the optimizer need to be adjusted, or whether you may
> > have to review other components of your registration structure.
> >
> > You will find examples on how to use Command Observers in almost
> > all the files in the directory:
> >
> >                     Insight/Examples/Registration
> >
> >
> >     Regards,
> >
> >
> >           Luis
> >
> >
> > --------------------------------------------------------------------
> > On Sat, Aug 1, 2009 at 6:49 AM, J.X.J. <wat.a.phony at gmail.com> wrote:
> >
> >>
> >> Hi everyone,
> >>
> >> I'm current using itk::BSplineDeformableTransform,
> >> itk::MutualInformationImageToImageMetric and
> >> itk::GradientDescentOptimizer
> >> to register 2D MRI images. My problem is that when running 2 phantom
> >> images
> >> the output image is almost exactly the same as the original moving image
> >> (nothing like the fixed image).
> >>
> >> I have normalized and smoothed the 2 input images using
> >> itk::NormalizeImageFilter and itk::DiscreteGaussianImageFilter with
> >> SetVariance(2.0). For mutual information the standard deviation is 0.4.
> >> Optimizer learning rate is 10.0, 200 iteration and with maximum on. This
> >> set
> >> up is kind of a mixture of a number of deformableregistration examples
> on
> >> default (as in I copied and pasted all parameter settings etc directly).
> >>
> >> Does anyone know what the problem could be? The code runs all 200
> >> iterations
> >> is thats an indication, also the metric value of each iteration is
> around
> >> 0.2 - 0.4 if that's any help.
> >>
> >> J.X.J.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Helo-with-bspline-mutual-information-gradient-descent-tp24768056p24768056.html
> >> Sent from the ITK - Users mailing list archive at Nabble.com.
> >>
> >> _____________________________________
> >> 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
> >>
> >
> > _____________________________________
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Helo-with-bspline-mutual-information-gradient-descent-tp24768056p24883109.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090808/5a2e7cc8/attachment.htm>


More information about the Insight-users mailing list