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

Luis Ibanez luis.ibanez@kitware.com
Thu, 21 Feb 2002 16:41:13 -0500


Stephen R. Aylward wrote:

>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?
>

The classes will be a variant of ImageFunction in which the output
type will be templated to be: { Point | Index |  ContinousIndex }.

They will get from the image the pointer to the Transform and
will keep it inside. They will not be particularly faster than
the current methods. It is more a matter of cleaning up the Image
class and allowing to generalize the Transforms. At this point
we are forced to use only Affine.


Thanks to the fact that ImageFunction already has methods for

-  Evaluat( Point ),
-  EvaluateAtIndex()
-  EvaluateAtContinuousIndex()

we will only need to instantiate the return type.

The helper classes will look like:

1) Point to Index : This is a function that receives a point and
    return an Index

template< typename ImageType, typename TCoordRep >
PointToIndexImageFunction :
    public ImageFunction<ImageType,
                         Index<ImageType::ImageDimension>,
                         TCoordRep  >

The call for Evaluate will then return an Index.



2) Point to ContinousIndex will be like

template< typename ImageType, typename TCoordRep >
PointToIndexImageFunction :
    public ImageFunction<ImageType,
                         ContinousIndex<ImageType::ImageDimension>,
                         TCoordRep  >



and so on.



  Luis