[Insight-developers] add template parameters to optimizer base class

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 30 17:17:33 EDT 2011


Hi Brian,

We should check with Gaetan on the implications
that this new template parameter may have in the Wrapping...


       Luis


----------------------------------------------------------------------------------------
On Tue, Mar 29, 2011 at 5:19 PM, brian avants <stnava at gmail.com> wrote:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list