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

Luis Ibanez luis.ibanez at kitware.com
Sun Jun 29 10:32:06 EDT 2008


Hi Steve,

I agree that both options of having GetInverse() returning a
pointer and having an IsInvertible() method make sense.

In the meantime we have backed up the modifications that we
put in yesterday, until we sort out a good design that satisfy
all constraints, including the need for making these methods
available through the Wrapping.

Something to keep in mind with the IsInvertible() method, is that
in some transforms, the result will depend on the current values
of the Transform. (e.g. in Affine Trasnsforms).


    Regards,


       Luis



-----------------------
Steve M. Robbins wrote:
> On Sat, Jun 28, 2008 at 10:50:22PM -0400, Luis Ibanez wrote:
> 
> 
>>This may help to find a better choice among the current options
>>of API for GetInverse().
> 
> 
> Among the options proposed, returning a pointer to the transformation
> is most appealing to me:
> 
>        virtual TransformBase::Pointer  GetInverse() const
> 
> with the guarantee that the pointer is never null; i.e. that
> non-invertibility is signalled by an exception.
> 
> In addition, I would propose that
> 
>        virtual bool IsInvertible() const
> 
> be available so that programs that *do* want to check for
> invertibility can do so without using a try/catch.
> 
> Regards,
> -Steve
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list