[Insight-users] Reading Transform using TransformFileReader

Lars Nygard lnygard at yahoo.com
Sun May 27 18:00:43 EDT 2007


Hi all,

If anybody can help me with this, id really appreciate it. I have a 
transform file (.tfm) which I obtained from the LandmarkInitializedMutualInformationRegistration
application. Now I want to use this transform in my own application without
having to enter in the matrix and so on. I tried to use the TransformFileReader
but when I update the transform reader I get a error (window saying abort, retry or cancel). 
Here's the code I use:

typedef itk::TransformFileReader TransformReaderType;
  TransformReaderType::Pointer transformreader = TransformReaderType::New();
transformreader->SetFileName( "GoldenTransform.tfm" );
  transformreader->Update();

And here's the transform file:

ObjectType = Scene
NDims = 3
NObjects = 1
ObjectType = Group
NDims = 3
Color = 1 0 0 1
BinaryData = False
TransformMatrix = 0.999994 -0.000926597 0.00323312 0.000938676 0.999993 -0.00373678 -0.00322963 0.00373979 0.999988
Offset = 22.6712 25.3394 27.1312
CenterOfRotation = 106.858 109.269 58.7379
ElementSpacing = 1 1 1
EndGroup = 

regards,
Lars Nygard


      
_________________________________________________________
Alt i én. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com


More information about the Insight-users mailing list