[ITK] Retrieving transform by downcast

Timothee Evain tevain at telecom-paristech.fr
Fri Nov 25 09:06:48 EST 2016


Hi Brad,

I'm on 4.10(.0).
Thanks for the follow-up, I will take a look.

Tim

----- Mail original -----
De: "Bradley Lowekamp (NIH/NLM/LHC) [C]" <blowekamp at mail.nih.gov>
À: "Timothee Evain" <tevain at telecom-paristech.fr>
Cc: "Dženan Zukić" <dzenanz at gmail.com>, community at itk.org
Envoyé: Vendredi 25 Novembre 2016 14:34:00
Objet: Re: [ITK] Retrieving transform by downcast

What version of ITK are you using?

If this transform originated from IO, then there is a patch in 4.10.1 that should address the problem so that the more robust and safe dynamic_cast can stilll be used.

HTH,
Brad

> On Nov 15, 2016, at 4:40 AM, Timothee Evain <tevain at telecom-paristech.fr> wrote:
> 
> Hi Dženan,
> 
> static_cast do the job, thanks for the hint.
> 
> Tim
> 
> ----- Mail original -----
> De: "Dženan Zukić" <dzenanz at gmail.com>
> À: "Timothee Evain" <tevain at telecom-paristech.fr>
> Cc: community at itk.org
> Envoyé: Lundi 14 Novembre 2016 18:45:48
> Objet: Re: [ITK] Retrieving transform by downcast
> 
> Hi Tim,
> 
> have you tried static_casting to VersorRigid3DTransform?
> 
> Regards,
> Dženan
> 
> On Mon, Nov 14, 2016 at 12:36 PM, Timothee Evain <
> tevain at telecom-paristech.fr> wrote:
> 
>> Hi everyone,
>> 
>> I'm wondering how can I retrieve the inverse of a VersorRigid3DTransform
>> through the GetInverseTransform() method to assign to another
>> VersorRigid3DTransform.
>> As this return a itk::Transform pointer, downcasting with dynamic_cast
>> leads to an error related to pointer being not one to a complete class.
>> I guess this had to do with Transform being a abstract class, so what is
>> the "standard" way to do ? Should I go through inverse parameters to
>> initialize the inverse transform ?
>> 
>> Tim
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>> 
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community



More information about the Community mailing list