[Insight-developers] Removing PhysicalPoitnToIndex() from itkImage ?

Stephen R. Aylward aylward@unc.edu
Thu, 21 Feb 2002 16:17:57 -0500


So this class could be used by any function that needed to do multiple
calls to a single transform such that appropriate intermediate
calculations are cached and therefore the multiple calls go faster?

s

Luis Ibanez wrote:
> 
> 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
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers

-- 
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695