[Insight-developers] RE: Metrics: Removing some template parameters
Lydia Ng
lng@insightful.com
Tue, 19 Feb 2002 17:22:35 -0800
Sounds reasonable to me.
To remove (4) and (5) we will need a GetNumberOfParameters function.
The transform/optimizer/metric communicates by passing parameters
around. The actual number of parameters will vary depending on
the type of transform used. Since we want to eventually be able
to plug&play these components dynamically we need a way to pass
around a variable size array.
As a group should we lock down on a consistent way of passing
around a variable sized array for all filters
- in some places people have used (T *) and in other
places people have used (std::vector<T> &)
Comments?
- Lydia
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
> Sent: Tuesday, February 19, 2002 12:35 PM
> To: Lydia Ng
> Cc: insight-developers@public.kitware.com
> Subject: Re: [Insight-developers] RE: Metrics: Removing some template
> parameters
>=20
>=20
>=20
> That's right !
>=20
> Transforms are now templated over:
>=20
> 1- TScalarType (that now will be only the "representation" type)
> 2- int Dimension of the InputSpace
> 3- int Dimension of the OutputSpace
> 4- TParameters
> 5- TJacobian
>=20
>=20
> (1) As we decided on the meeting the internal computation type
> will be "double" and the "TScalarType" will be used for
> representation ... like : itk::Point<TScalarType,dim>
>=20
> (2) and (3) seems to be neecesary because input and output
> itk::Point<> are templated over dimension.
>=20
> (4) and (5) could be removed is we agree to pack them in
> std::vector<double>.... (or something equivalent).
>=20
> That will reduce the itk::Transform<> to be templated over:
>=20
> 1) Representation type (double/float)
> 2) Dimension of input space
> 3) Dimension of output space
>=20
>=20
> Is that reasonable ?
>=20
>=20
> Luis
>=20
>=20
> -------------------------------------------
>=20
> Lydia Ng wrote:
>=20
> >>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
> >
>=20
>=20
>=20
>=20