[Insight-developers] Some suggestion
Ashish Poddar
ahpoddar at gmail.com
Mon Jan 24 16:54:58 EST 2005
I was just checking Affine Transform
<http://www.itk.org/Doxygen/html/classitk_1_1AffineTransform.html> and
found some TODO comments
1.
template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate2D (
TScalarType angle,
bool pre = 0
)
TODO: Find a way to generate a compile-time error is this is used with
NDimensions != 2
--------------------
2.
template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate3D (
const OutputVectorType & axis,
TScalarType angle,
bool pre = 0
)
TODO: Find a way to generate a compile-time error is this is used with
NDimensions != 3
I am not sure whether this a pending TODO still or not, and if it is,
then probly the website is not updated...
anyways my suggestion for this is just define the function for a
particular template parameter only, as under:
1.
template<class TScalarType = double, 3>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate2D (
TScalarType angle,
bool pre = 0
)
--------------------
2.
template<class TScalarType = double, 2>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate3D (
const OutputVectorType & axis,
TScalarType angle,
bool pre = 0
)
compiler error will be generated in case we declare the template
parameter as 2 in former case, and 3 in latter case, as function not
defined.
I havent tried it, but guess that it should work fine...
regards,
Ashish.
--
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
More information about the Insight-developers
mailing list