[Insight-developers] itk::Image updates

Miller, James V (CRD) millerjv@crd.ge.com
Tue, 6 Nov 2001 07:52:09 -0500


I would name the 

TransformPhysicalPointToDiscreteIndex
TransformDiscreteIndexToPhysicalPoint

methods as 

TransformPhysicalPointToIndex
TransformIndexToPhysicalPoint

since the term "DiscreteIndex" does not appear anywhere else in the toolkit.  Index<> is defined to
discrete. 

-----Original Message-----
From: Damion Shelton [mailto:dmshelto@andrew.cmu.edu]
Sent: Monday, November 05, 2001 5:34 PM
To: Insight Developers
Subject: [Insight-developers] itk::Image updates


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-




_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers