[Insight-developers] Removing PhysicalPoitnToIndex() from
itkImage ?
Damion Shelton
dmshelto@andrew.cmu.edu
Thu, 21 Feb 2002 18:25:22 -0500
Hi...
> Can we just remove the creation of the AffineTransforms and assume that
> there will always be a valid transform plugged into the pointer ?
OK... this was why I was confused. I was assuming that a valid transform
always exists, in which case the functions built into itk::Image just use
this transform (rather than creating a new one).
It should be pretty easy to have the image constructor create a default
affine transform when the image is created, and then update this transform
when the origin and spacing are modified. This ensures that there is always
something there, even if it's now "correct".
Then, if the image turns out to be something weird, like ultrasound, the
image reader (or other 3rd party) can replace the affine transform with
something else whenever it's appropriate.
I still think it would be more convenient to leave the actual function
calls within Image, if for no other reason than to reduce complexity. As
long as we can safely assume a transform exists, I don't think this is a
problem.
Any thoughts?
-Damion-