[Insight-developers] transform internal types

M.Staring at lumc.nl M.Staring at lumc.nl
Thu May 6 10:45:41 EDT 2010


Hi,
 
> 
> However, backward compatibility problems occur:
> 1) Transform< float,  indim, outdim > is changed wrt the 
> ParametersType
> 2) there is no ParametersType typedef in TransformBase 
> anymore, so code that uses TransformBase::ParametersType does 
> not work anymore.

When I tried to really implement it, I got in trouble with (2) moving
the ParametersType typedef from TransformBase, because the TransformIO
classes depend on it.

So, as an alternative solution I added a template parameter TScalarType
to the TransformBase, like

#ifdef ITK_USE_TRANSFORM_SCALARTYPE_FOR_PARAMETERSTYPE
template <class TScalarType = double >
#endif

and then do:

#ifdef ITK_USE_TRANSFORM_SCALARTYPE_FOR_PARAMETERSTYPE
  typedef  TScalarType                     ParametersValueType;
  typedef  Array< ParametersValueType >    ParametersType;
#else
  typedef  double                          ParametersValueType;
  typedef  Array< ParametersValueType >    ParametersType;
#endif

I also had to make some small changes to TransformIO classes. The
complete patch is attached to this email. The good news is that the
experimental build succeeded.

With kind regards,

Marius
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Insight_changes1.patch
Type: application/octet-stream
Size: 13283 bytes
Desc: Insight_changes1.patch
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100506/9f883b78/attachment.obj>


More information about the Insight-developers mailing list