H5 to affine/warpfield nifti

Hello all,

I am trying to convert the fmriprep transform h5 files into their affine and warpfield nii components. What is the most straight forward way to do this?

Apologies if this has been posted before - I have been unable to find it in my searches and I am new to ANTs and h5 files. I’ve seen this thread:

But I need the information stated in the first sentence - an example of how to go from the h5 file to the mat/nii file.

Other threads I’ve run across seem to circle around this issue (e.g., using antsApplyTransform to apply the h5 transform), but I would like to extract the transforms for use in another pipeline that uses Connectome Workbench commands to adjust FSLR surfaces after some additional processing (e.g., using the command: “wb_command -convert-warpfield”).

Thanks for any help you can provide,


Nm - I was able to track down the answer thanks to this post: https://sourceforge.net/p/advants/discussion/840261/thread/ba6a10b0/

For anyone interested, this ANTS command provides what is needed:
CompositeTransformUtil --disassemble TRANSFORMNAME.h5 OUTPUTNAME