[Insight-users] How to write transformation matrices to file?

Miller, James V (Research) millerjv at crd.ge.com
Thu Jul 29 14:28:20 EDT 2004


George,

The transformation from the Demons algorithm is a vector field.  You
can write out the vector field using ImageFileWriter (templated
over an image of vectors).  You can later read the vector field back
in.

I usually use the Meta format (mhd) to store the output of the Demons.

There was a bug in reading vector images that was fixed a few months 
ago.  So if you are using a cvs version of ITK, you can successfully 
read the vector fields back in.

If you are using an older version of ITK, you'll need to write out each
component of the vector into a separate file.  Here you use a number of 
VectorIndexSelectionCastImageFilter to separate the vector field into
a set of scalar files and pass each scalar field to an ImageFileWriter.

Jim

-----Original Message-----
From: GEORGE XU [mailto:gxu5 at jhu.edu]
Sent: Thursday, July 29, 2004 1:09 PM
To: insight-users at itk.org
Subject: [Insight-users] How to write transformation matrices to file?


Hello,

I am using the demons deformable registration to match  two MRI brain scan
images. I would like to save the transformation so that it can be used again
at a later stage. Is there a way that I can save the transformation and
write it to a file?

Thanks,
George

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list