[Insight-users] vnl levenberg marquardt

Luis Ibanez luis.ibanez at kitware.com
Sun Jun 5 21:59:02 EDT 2005


Hi Suyash,


You are probably calling the GetOptimizer() method, before
having invoked the SetCostFunction() method. the consequence
is that the m_VnlOptimizer is NULL at that point.


The actual vnl_ optimizer can only be created after you connect
the cost function, because it expect the function as argument
of its constructor.


For details, please look at the code in


          Insight/Code/Numerics/
              itkLevenbergMarquardOptimizer.cxx




    Regards,


        Luis


-----------------------

Suyash P. Awate wrote:

> 
> Hello,
> 
> I am trying to use the levenberg marquardt (LM) optimization method in 
> ITK and am encountering some unexpected behavior. To further explore the 
> issue I got hold of the vnl LM object via the ITK GetOptimizer() method 
> and then used set_trace(true) and set_verbose(true) on the vnl LM object 
> to facilitate debugging.
> 
> However, when I run my program it crashes when make the set_trace() and 
> set_verbose() calls.
> 
> Could someone please help me understand why this happens and how I could 
> avoid this ? Thanks in advance.
> 
> Best regards,
> Suyash.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





More information about the Insight-users mailing list