[Insight-users] LBFGSBoptimizer and MI value

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 30 16:18:00 EDT 2009


Hi Serena,

Why did you replace the

    optimizer->GetCachedValue()

with

     optimizer->GetValue()

??

With the original code

    std::cout << optimizer->GetCurrentIteration() << "   ";
    std::cout << optimizer->GetCachedValue() << "   ";
    std::cout << optimizer->GetInfinityNormOfProjectedGradient() <<
std::endl;


I get output similar to


Starting Registration
0   -0.126569   0
0   -0.128309   0
0   -0.132048   0
0   -0.145772   0
0   -0.206432   0
0   -0.304187   0
0   -0.304187   0.000164939
1   -0.359927   0.000164939
1   -0.359927   0.00022934
2   -0.289385   0.00022934

when registering the images:

   brainweb165a10f17.mha
   brainweb165a10f17Rot20Tx20.mha


Could you please restore the original code
and let us know if this time you get non-zero
outputs ?


       Thanks


             Luis


--------------------------------------------------------------
On Tue, Jun 30, 2009 at 4:00 PM, Serena Fabbri <fabbri at u.washington.edu>wrote:

> Hi All,
>
> I am using DeformableRegistration8 with Mattes Mutual Information and
> LBFGSBoptimizer.
> I'd like to know how the MI and the parameters change in each iteration. In
> the example, class CommandIterationUpdate is implemented  and I only add :
>
> std::cout <<"Iter "<<optimizer->GetCurrentIteration() << "   ";
> std::cout <<" Metric "<<optimizer->GetValue() << ":";
> std::cout <<" Parameters "<<optimizer->GetCurrentPosition() << std::endl;
>
> I use a Bspline-grid with 3 bound nodes and 3 node in the image and  I run
> fixed=MRI (176, 256, 160) (1,1,1)mm   moving=CT (176, 256, 160) (1,1,1)mm
>
> The code runs, I get a pretty good registered image but Metric value and
> parameters values are  always 0.
> could anybody point out me where the error is?
> are the above instructions wrong?
>
>
> Thanks.
>
> Serena.
>
> _____________________________________
> 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/20090630/65191ba3/attachment.htm>


More information about the Insight-users mailing list