I would be grateful on any advice/info on how to apply a DARTEL deformation field (obtained from New Segment) in a script. The output files related to the deformation i have are: mysegvol_seg8.mat (transformation matrix), y_mysegvol.nii (forward deformation field) and iy_mysegvol.nii (inverse deformation field).
I would like to use directly the inverse field but the only SPM tool i found so far is one which requires the forward field, inverse it and apply it:
jobs{1}.util{1}.defs(1).fnames = {...
'/my/path/to/vol_to_be_inverse_transformed.nii,1';...
};
jobs{1}.util{1}.defs(1).comp{1}.inv.comp{1}.def = {...
'/my/path/to/y_mysegvol.nii';...
};
jobs{1}.util{1}.defs(1).comp{1}.inv.space = {...
'/my/path/to/y_mysegvol.nii/myref.nii,1';...
};
But i get an error saying the inverse transformation failed. Is there a way to directly apply the inverse transformed already computed?
|