[Insight-developers] Removing SpatialOrientation stuff
from itk::ImageBase
Luis Ibanez
luis.ibanez at kitware.com
Fri Sep 9 17:04:43 EDT 2005
Hi Kent,
As long as we support VC++ 6.0 we cannot do any partial specialization.
This fact is unfortunate, and it has prevented us from doing a lot of
cool MetaProgramming... so we look forward to the day when we can drop
the support for Visual C++ 6.0.
In the meantime,... looking at your code, it seems that we don't
really need to template the class OrientationAdapter over:
1) OrientationRepresentation
2) ImageDimension
Instead, I would suggest to only template it over ImageDimension
and to make OrientationRepresentation to be a trait of the
specialization of OrientationAdapter.
The drawback of this approach is that it will only allow one
OrientationRepresentation per image dimension.
From the developers point of view this may not be too bad,
since in their applications they could create a variation of
the OrientationAdapter, that has in its traits a different
definition of the OrientationRepresentation.
I would guess that in the typical uses of the orientation
representation we don't need to switch from one representation
to another.
Do you see other drawbacks in moving the OrientationRepresentaiton
from being a template argument to being an internal trait ?
My 2 cents,
Luis
------------------------
Kent Williams wrote:
> My proposal for removing SpatialOrientation stuff from itk::ImageBase
> (scroll to the bottom):
>
> http://www.itk.org/Wiki/Proposals:Orientation#Cosine_Direction_Vectors.2C_and_itk::SpatialOrientation_.28Kent_Williams.29
>
>
> In summary, the conversion betwee SpatialOrientation and Direction
> Cosines is moved to a template 'helper' class. I'm open to
> discussions/suggestions on whether this is the way to go -- the drawback
> to the scheme presented is that it requires partial template
> specialization to handle general N-dimensional orientation
> representations elegantly.
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
More information about the Insight-developers
mailing list