[Insight-developers] some probable bug in itk::SingleValuedVnlCostFunctionAdaptor

Ashish Poddar ahpoddar at gmail.com
Mon Jun 20 04:43:27 EDT 2005


Hi,
 Thanks for the reference, I will check the latest version of ITK.
 The version of ITK that I am using is from the version 2.0 download 
available from the website.

with regards,
Ashish.
 On 6/19/05, Luis Ibanez <luis.ibanez at kitware.com> wrote: 
> 
> 
> 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
> 
> 
> 
> 


-- 
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20050620/20032feb/attachment.htm


More information about the Insight-developers mailing list