[Insight-developers] some probable bug
in itk::SingleValuedVnlCostFunctionAdaptor
Luis Ibanez
luis.ibanez at kitware.com
Sun Jun 19 19:37:03 EDT 2005
Hi Ashish,
You are right, the Adaptor should check first
for this pointer not to be NULL.
This is a known bug and was fixed on Monday March 7 2004.
You will find the log of the CVS commit in the following link:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Numerics/itkSingleValuedVnlCostFunctionAdaptor.cxx?r1=1.11&r2=1.12&root=Insight&sortby=date
Please update your CVS checkout of ITK.
Regards,
Luis
--------------------------------------------------------------------
Ashish Poddar wrote:
> I was trying to use ConjugateGradientOptimizer in place of
> RegularStepGradientDescentOptimizer, and it always crashes when it tries
> to access {DerivativeType &input} whose value (as I traced back) comes
> from the function { vnl_cost_function::f} in the call {this -> compute
> (x, &f, 0);}
>
> here the value of "g" which is a pointer is set to null, which causes
> the crash... (if I did something wrong or interpreted something wrong,
> please correct)
>
> so probably this change needs to be incorporared in the compute function
>
> (last 2 lines of the function)
> __
> _Current:_
> ConvertExternalToInternalGradient( externalGradient, *g );
> *f = static_cast<InternalMeasureType>( measure );
>
> _Modified:_
> if (g) ConvertExternalToInternalGradient( externalGradient, *g );
> if (f) *f = static_cast<InternalMeasureType>( measure );
>
>
> with best regards,
> Ashish.
>
> p.s. this took me 5-6 days to figure out the problem !! and if the
> solution is not correct please do tell me..
> --
> Ashish Poddar
> Have an acceptable reason for accepting anything.
> Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
> <mailto:MSN:ashish_poddar at yahoo.com>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list