[Insight-developers] Lots of new warnings: Adding an alternative GetInverse() method to the transform hierarchy.

Douglas Alan doug at alum.mit.edu
Sat Jun 28 22:17:25 EDT 2008


Luis Ibanez <luis.ibanez at kitware.com> wrote:

> Giving the limitations of swig, it seems that the signature
> 
>        virtual TransformBase::Pointer  GetInverse() const
> 
> is a better option to try.
> 
> 
> Doug: will this signature work for the coordinates conversions
>        that you are looking for ?

Yes, I think that this will be okay.  I'm a bit confused by GetInverse()
returning a TransformBase object, however, rather than a Tranform<T1,
N1, N2> object.  Is the reason for returning a TransformBase object so
as to support inverses that are have a different scalar type, or a
different number of input and/or output dimensions?

If in Slicer, T1, N2, and N2, are always the same, then I suppose that
Slicer can safely downcast the TransformBase.  (It's safe to downcast
ITK's smart pointers, right?)  If this doesn't hold true in Slicer,
however, then it seems to me we just end up with more or less the same
issue, albeit in a slightly different guise.

|>oug


More information about the Insight-developers mailing list