[Insight-developers] add template parameters to optimizer base class
    brian avants 
    stnava at gmail.com
       
    Tue Mar 29 17:19:13 EDT 2011
    
    
  
hi everyone
itkCostFunction defines the following:
class ITK_EXPORT CostFunction:public Object
{
public:
< snip >
  /**  ParametersType typedef.
   *  It defines a position in the optimization search space. */
  typedef double                       ParametersValueType;
  typedef Array< ParametersValueType > ParametersType;
....
what we'd like to do is define ParametersValueType via a template parameter
such that we can use float type.
the motivation is to allow us to have Derivatives/Parameters that are
float deformation fields or float BSpline parameter images that are
then memory mapped to Parameter/DerivativeType arrays.
does anyone have any objection?   we'd have to make changes to all the
derived classes but these changes should be backward compatible
because the default template parameter for ParametersValueType would
be double ( as it currently is ).
brian
    
    
More information about the Insight-developers
mailing list