[Insight-developers] Removing PhysicalPoitnToIndex() from itkImage ?
Luis Ibanez
luis.ibanez@kitware.com
Thu, 21 Feb 2002 16:02:33 -0500
Hi,
itkImage has a two methods for converting between Indexes and Points
and two other methods for converting between ContinuousIndexes and Points
These methods construct (and cache) a couple of AffineTransforms.
This limits the use to the geometries that can be represented by Affine
transforms.
I could be better to support this by a helper class external to the image.
This class would:
1) get the Transform (of any kind) from the image,
2) receive an Index, (to be mapped to a physical point)
3) cast this Index to an itkPoint
4) map the Point through the Transform
5) return the resulting point.
This is basically what the method:
TransformIndexToPhysicalPoint()
is doing.
Similar methods:
TransformPhysicalPointToContinuousIndex()
TransformPhysicalPointToIndex()
TransformContinuousIndexToPhysicalPoint()
perform the other combinations and could then be
replaced by equivalent helper classes.
Does anybody see a disadvantage in outsourcing
these conversions from the itkImage ?
Luis