[Insight-developers] inverse transformations

Paul Koshevoy koshevoy at sci.utah.edu
Thu Sep 29 20:08:13 EDT 2005


Hi,

I am working on an automatic image mosaicing problem with
Ross Whitaker and Tolga Tasdizen.

I am having some problems with the current implementation of the
inverse transformation -- the GetInverse method.

First, GetInverse is not a virtual function. Therefore, the
transform type must be known in order for the right GetInverse
to be called, which means it must be specified as a template
parameter.

Second, GetInverse is not meaningful for transforms where no general
inverse exists. For example, the inverse of a radial distortion
transform may require a different number of parameters than the 
forward transform.

For my application I need a general method for inverse transformation
of a point. The way I would go about this is by declaring

  virtual bool
  GetInverse(itk::Transform<TScalarType,
                            NInputDimensions,
                            NOutputDimensions>::Pointer & inverse) const;

The requirement that the inverse transform and the forward transform
must be of the same type is too restrictive. The transforms which do
not have a general analytic inverse should be able to return an
iterative numeric inverse wrapper class instead.

An alternative solution is to provide BackTransformPoint,
BackTransformVector and BackTransformCovariantVector as virtual member
functions of the itk::Transform base class. These (currently deprecated) 
methods are already provided by a number of transforms. Transforms that do 
not have a general inverse may use an iterative numeric inverse method 
internally. This is the approached I have used so far (with minor 
alterations to ITK 1.8.1 and 2.0.1).

Are these observations accurate and are my proposed solutions acceptable?

        Paul.


More information about the Insight-developers mailing list