[Insight-developers] RE: Metrics: Removing some template parameters

Lydia Ng lng@insightful.com
Tue, 19 Feb 2002 12:18:18 -0800


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

De-templating the Transform classes needs to occur at the same
time to make things work.
Might it be easier to start with Transform classes first?

-Lydia

> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
> Sent: Tuesday, February 19, 2002 12:09 PM
> To: Lydia Ng
> Cc: insight-developers@public.kitware.com
> Subject: Metrics: Removing some template parameters
>=20
>=20
>=20
> Hi,
>=20
> Metrics are currently templated over:
>=20
>=20
> - 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)
>=20
>=20
> How about
>=20
> 1) Removing the return type and fix it as "double"
>    (its what all of them are returning right now)
>=20
>=20
> 2) Removing the derivative template by using
>    something like:
>=20
>         std::vector<double>
>=20
>    Currently all of them are returning CovariantVector<double,N>
>    Where N is the number of parameters of the Transform.
>=20
>=20
> 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.
>=20
>=20
>=20
> With this changes, Metrics will be templated only over the
> Moving/Fixed Image types and will plug in Interpolators and
> Transforms at runtime.
>=20
> Does anybody see potential conflicts/disadvantages in doing
> these changes ?
>=20
>=20
>=20
> Luis
>=20
>=20