<br>Hi J.X.J.<br><br>If the Metric is oscillating, this may be a symptom that your optimizer<br>is taking jumps that are too large.<br><br>I usually plot the metric values by using GNUPlot, but you could do the<br>same with the spreadsheet of OpenOffice, or even with Excel.<br>
<br>---<br><br>About the compilation error, please post also the sentence that<br>follows the one that you posted. The next sentence to that one <br>tells what the problem is.<br><br><br> Thanks<br><br><br> Luis<br>
<br><br>----------------------<br><div class="gmail_quote">On Sat, Aug 8, 2009 at 7:45 PM, J.X.J. <span dir="ltr"><<a href="mailto:wat.a.phony@gmail.com">wat.a.phony@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Luis,<br>
<br>
thanks for your reply. I have added an observe to the code, the metric value<br>
output seems to oscillate rather than a general increase for decrease in<br>
value. How do you plot the metric values? Is there a way to output the<br>
metric value of each iteration into a text or similar file and I could use<br>
MATLAB to plot it, or is there a way to do that directly from ITK?<br>
<br>
Also I've noticed that using Viola and Wells MI is REALLY slow when coupled<br>
with BSpline Deformable Transform. I've tried using Mattes MI which is much<br>
much faster in comparison in the order of 5-10 fold, why is that the case?<br>
<br>
And finally (I'm sorry for all the questions, programming in C is not my<br>
forte), I tried using Levenberg Marquardt Optimizer but I get this error but<br>
I compile the code: error C2664:<br>
'itk::ImageRegistrationMethod<TFixedImage,TMovingImage>::SetOptimizer' :<br>
cannot convert parameter 1 from 'itk::LevenbergMarquardtOptimizer::Pointer'<br>
to 'itk::ImageRegistrationMethod<TFixedImage,TMovingImage>::OptimizerType *'<br>
<br>
Any help is appreciated<br>
J.X.J.<br>
<div><div></div><div class="h5"><br>
<br>
Luis Ibanez wrote:<br>
><br>
> Hi J.X.J.<br>
><br>
> The first thing that you want to do is to instantiate a Command/Observer<br>
> and to print out the values of the Metric at every iteration of the<br>
> optimizer.<br>
><br>
> Plot this values and/or send the output to the mailing list.<br>
><br>
> From the progression of the metric values it will be possible to determine<br>
> if parameters of the optimizer need to be adjusted, or whether you may<br>
> have to review other components of your registration structure.<br>
><br>
> You will find examples on how to use Command Observers in almost<br>
> all the files in the directory:<br>
><br>
> Insight/Examples/Registration<br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
> --------------------------------------------------------------------<br>
> On Sat, Aug 1, 2009 at 6:49 AM, J.X.J. <<a href="mailto:wat.a.phony@gmail.com">wat.a.phony@gmail.com</a>> wrote:<br>
><br>
>><br>
>> Hi everyone,<br>
>><br>
>> I'm current using itk::BSplineDeformableTransform,<br>
>> itk::MutualInformationImageToImageMetric and<br>
>> itk::GradientDescentOptimizer<br>
>> to register 2D MRI images. My problem is that when running 2 phantom<br>
>> images<br>
>> the output image is almost exactly the same as the original moving image<br>
>> (nothing like the fixed image).<br>
>><br>
>> I have normalized and smoothed the 2 input images using<br>
>> itk::NormalizeImageFilter and itk::DiscreteGaussianImageFilter with<br>
>> SetVariance(2.0). For mutual information the standard deviation is 0.4.<br>
>> Optimizer learning rate is 10.0, 200 iteration and with maximum on. This<br>
>> set<br>
>> up is kind of a mixture of a number of deformableregistration examples on<br>
>> default (as in I copied and pasted all parameter settings etc directly).<br>
>><br>
>> Does anyone know what the problem could be? The code runs all 200<br>
>> iterations<br>
>> is thats an indication, also the metric value of each iteration is around<br>
>> 0.2 - 0.4 if that's any help.<br>
>><br>
>> J.X.J.<br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://www.nabble.com/Helo-with-bspline-mutual-information-gradient-descent-tp24768056p24768056.html" target="_blank">http://www.nabble.com/Helo-with-bspline-mutual-information-gradient-descent-tp24768056p24768056.html</a><br>
>> Sent from the ITK - Users mailing list archive at Nabble.com.<br>
>><br>
>> _____________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>><br>
><br>
> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Helo-with-bspline-mutual-information-gradient-descent-tp24768056p24883109.html" target="_blank">http://www.nabble.com/Helo-with-bspline-mutual-information-gradient-descent-tp24768056p24883109.html</a><br>
</font><div><div></div><div class="h5">Sent from the ITK - Users mailing list archive at Nabble.com.<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br>