[Insight-developers] itk::Image updates
Damion Shelton
dmshelto@andrew.cmu.edu
Mon, 05 Nov 2001 17:34:24 -0500
Wilson and I made the changes to itk::Image discussed earlier (as a
temporary solution until a stable TransformBase exists). A few pieces of
additional info:
GetIndexToPhysicalTransform and GetPhysicalToIndexTransform are no longer
const functions. They now have the ability to create transforms (stored as
private members of the class) if none exist when a transform is requested.
If a transform pointer exists when the function is called, it is not
modified.
TransformPhysicalPointToContinuousIndex and
TransformContinuousIndexToPhysicalPoint now rely on cached values of the
transforms, rather than recomputing the transform each time. Additionally,
I had some problems with the existing version of this function, due to the
constructor of AffineTransform being protected (a normal instance of the
transform was created rather than ::New() ). This is now resolved, since
the transforms are stored as pointers.
We are also thinking of adding the following functions:
TransformPhysicalPointToDiscreteIndex
TransformDiscreteIndexToPhysicalPoint
which would allow you to use normal indices rather than continuous indices.
I am currently truncating continuous indices to obtain normal ones in
external code, which tends to look the same every time points are
transformed. Any suggestions on whether or not the above two functions
would be useful are welcome.
Finally, I did a complete build of all tests and things seem to be fine,
but let me know if there are any problems.
-Damion-