[Insight-users] TransformFileReader

Brecht Heyde Brecht.Heyde at med.kuleuven.be
Fri May 13 12:19:52 EDT 2011


Hi Vincent,

 

To get the scalartype of the transform, you typically do this I think:

 

typedef itk::AffineTransform<float, 2> TransformType;

TransformType::Pointer transform = TransformType::New();

std::cout << typeid(TransformType::ScalarType).name() << std::endl;

 

I'm not quite sure how this works in combination with an
itk::TransformFileReader, since the txt file does not contain type info.

I have not looked into this myself, but I think in the case you don't
specify it manually, ITK takes the default value. Otherwise you might have
to cast, I'm not sure.

 

Can anyone correct me on this?

 

Best regards,

Brecht Heyde

 

From: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org]
On Behalf Of Vincent Garcia
Sent: donderdag 12 mei 2011 13:56
To: insight-users at itk.org
Subject: [Insight-users] TransformFileReader

 

Hi,

I'm trying to read a transformation from a file and I have a little
probleme.
I use the object itk::TransformFileReader to read the file and I get the
transformation as follow:

typedef  itk::TransformFileReader                TransformReaderType;
typedef  TransformReaderType::TransformListType  TransformListType;
typedef  TransformReaderType::TransformType      BaseTransformType;

TransformListType *        list      = reader->GetTransformList();
BaseTransformType::Pointer transform = list->front();

Using transform->GetNameOfClass(), I know what is the transformation class
corresponds to the transfom object.
In my case, it's a AffineTransform. However, how do I know if this transform
is coded on float or on double?

Thanks,

Vincent Garcia

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110513/7d5ec48c/attachment.htm>


More information about the Insight-users mailing list