[Insight-developers] itkImage physical/data conversions

Damion Shelton dmsst59+@pitt.edu
Tue, 12 Jun 2001 13:50:26 -0400


Some time back I implemented a function in itkBloxBoundaryPointImage called
ConvertPhysicalToDataCoords(TVectorType physicalCoords, IndexType&
dataCoords). physicalCoords is a vector of doubles representing a point in
physical space; after execution, dataCoords contains the coordinates in
index space, if these coordinates are valid index coordinates in the image.
itkBloxBoundaryPointImage is under Code/Common, if you want to take a look.

My question is, how does this relate to the two functions (which I just
noticed today):

      AffineTransformType  GetIndexToPhysicalTransform (void)const
      AffineTransformType  GetPhysicalToIndexTransform (void)const


Is it worthwhile to have a function which returns an actual index, rather
than a transform? My implementation ignores the transformation component of
PhysicalImage, which is obviously a bad move. One feature which might be
nice to have, though, is bounds checking, which results in a return value of
true if the index is part of the image, or false if it isn't.

Any thoughts?

-Damion-