[Insight-developers] Optimizers / Registration

Miller, James V (CRD) millerjv@crd.ge.com
Mon, 2 Apr 2001 08:27:28 -0400


Luis,

I think I found the problem with the itkAmoebaOptimizer.  itkAmoebaOptimizer has an instance of
VnlCostFunctionAdaptor and is relying on its superclass itkSingleValueNonlinearVnlOptimizer method
SetCostFunction() to marshal the function calls to the real cost function.  Unfortunately, this
SetCostFunction() only changes the itkSingleValueNonlinearVnlOptimizer's member of the cost function,
not the member is itkAmoebaOptimizer.  The member in itkAmoebaOptimizer is passed to vnl, however,
the itk user can only set the cost that itkSingleValueNonlinearVnlOptimizer uses not the one the
itkAmoebaOptimizer uses.

The bottom line is that it is not a problem with vnl but a problem with the itkAmoebaOptimizer.  I'll
check in a fix.

Jim


-----Original Message-----
From: Luis Ibanez [mailto:ibanez@cs.unc.edu]
Sent: Sunday, April 01, 2001 12:31 PM
To: insight
Subject: [Insight-developers] Optimizers / Registration



Hi Bill,

--------
> Luis,
> itkAmoebaOptimizerTest is failing because an exception is being thrown at:
> itkSingleValuedNonLinearVnlOptimizer.h line 131.


Yes, the exception is thrown because the SmartPointer
appears to be null at the moment of the evaluation.

The optimizers are using an adaptor class to encapsulate
a RegistrationMetric inside a vnl_cost function. This last
one is the one expected by vnl_optimizers.

The adaptor class keeps a SmartPointer to the real 
RegistrationMetric.  In the test, this pointer is initialized,
but when the optimizer runs, it seems to be null.

Looks like Amoeba is doing an internal copy of the vnl_cost
function, and this copy is not transferring the SmartPointer.
I'll look into that.


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


BTW Here is the status of our other test that are failing:


1) LBFGSOptimizerTest
2) LevenbergMarquardtOptimizerTest

Both report to be failing, but they are running ok.
it seems that vnl is sending a message to cerr.


3) ImageToImageAffineNormalizedCorrelation
4) ImageToImageAffinePatternIntensity

They are computing a NaN at some point. Looks like a 
division by zero. It works fine on VC++ though.  


I'm working on that, to have them clean
before wednesday.


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



Thanks


Luis

_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers