Is there a builtin way for converting the transform.h5 file made by 3DSlicer to a xform file as produced by cmtk?
Here is an example of the same transformation in both formats:
>> h5read('slicer_transform.h5', '/TransformGroup/0/TranformParameters')
ans =
1.0430
-0.0198
-0.0326
0.0144
1.0304
-0.1652
0.0353
0.1646
1.0300
-97.7032
-194.5304
-243.7022
$ cat cmtk_transform.xform/registration
! TYPEDSTREAM 2.4
registration {
reference_study "target.nrrd"
floating_study "source.nrrd"
affine_xform {
xlate -101.8 -205.9 -143.7
rotate 9.031949273 -1.921484041 -0.7885958359
scale 1.04498569 1.044250032 1.040359656
shear -8.001045526e-05 -0.0002715663214 -0.001942363876
center 282.2 512.7 187.7
}
}
(note the âsâ of âtransformâ is really missing in the hdf5 dataset name)
Here, the cmtk transform was produced by mapping the source image on the target image produced by slicer resampling. The fit is perfect.