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

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sat Jun 28 16:10:02 EDT 2008


Hi Luis,

I thought that SmartPointers should be used as output of a method only  
if really needed, and must not be used as input.
The new method is using it though — I have missed something?

Is it only to change the method signature? If so, and if the usage of  
smart pointers can't be avoided, perhaps

   virtual Pointer GetInverse() const

would be a better option? A null pointer or an exception can be used  
to indicate that no inverse transform can be produced.

Regards,

Gaëtan


PS: a perhaps less important problem for you: swig is currently not  
able to produce valid code for references to smart pointers. At this  
time, I think that code would not be usable in python, tcl, etc

Le 28 juin 08 à 15:54, Luis Ibanez a écrit :

>
> Hi Bill,
>
> Yeap, the change is now being backed off.
>
> The existing GetInverse method use "Self" as argument, therefore
> every class returns a trasnsform of its own type.
>
> The change to virtual was not enough,
> in practice we need a full new method with a different signature.
>
> We are replacing (via backward-compatible deprecation mechanism)
> the method
>
> bool Transform::GetInverse( Self * inverse );
>
> with
>
> virtual bool
> TransformBase::GetInverse( TransformBase::Pointer & inverse ) const;
>
>
> The change has been committed now.
>
>
>  Luis
>
>
> ----------------------
> Bill Lorensen wrote:
>> Luis,
>> After your itkTransform.h changes, there are lots of warnings:
>> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=110692
>> Bill
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.mandriva.org
http://www.itk.org  http://www.clavier-dvorak.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20080628/6514a77c/attachment.pgp>


More information about the Insight-developers mailing list