[Insight-developers] Metrics: Removing some template parameters

Luis Ibanez luis.ibanez@kitware.com
Tue, 19 Feb 2002 15:09:13 -0500


Hi,

Metrics are currently templated over:


- the type of the return value
- the type of the derivative
- the type of the target (now called Fixed) image
- the type of the Mapper (which is templated over
                        the reference image type)


How about

1) Removing the return type and fix it as "double"
   (its what all of them are returning right now)


2) Removing the derivative template by using
   something like:

        std::vector<double>

   Currently all of them are returning CovariantVector<double,N>
   Where N is the number of parameters of the Transform.


3) The Mapper doesn't seems to be making a great contribution
   either. It is basically delegating to the Interpolator.
   (and consuming some clock cycles on the way...)
   It could be interesting to plug the Interpolator and the
   Transfom directly into the Metric and get rid of the Mapper.



With this changes, Metrics will be templated only over the
Moving/Fixed Image types and will plug in Interpolators and
Transforms at runtime.

Does anybody see potential conflicts/disadvantages in doing
these changes ?



Luis