How to save the deformation field ?

registration
(Sindhura C) #1

I am executing deformableregistration15.cxx
I wonder how to save the deformation field? In which format should I save it?
It didn’t happen with both mhd and mha formats.

(Dženan Zukić) #2

Deformation field is an image of vectors, and can be written to disk just like any other image. That example already has the code for writing. But that only happens if you supply all the command line parameters (filenames). What is the exact problem you are running into?

(Matt McCormick) #3

It is also possible to use the TransformFileWriter to write the transformation to an HDF5 file.

(Sindhura C) #4

Thanks @matt.mccormick I stored it in .tfm format. How to read it? how to visualize it?

(Matt McCormick) #5

.h5 is recommended. You can visualize it with the 3D Slicer Transform Visualizer.

1 Like