External Email - Use Caution
Hi all!
I am working on implementing some freesurfer synth tools into a larger diffusion processing pipeline. Doing so, I would like to use mri_synthmorph to generate a transform and then pass it downstream. FIrstly, I use the dockerized synthmorph version, which seems
to present discrepancies in its behaviour vs local testing:
-
Can someone explain the expected output format of freesurfer transforms? When used within docker, I must define affine transforms as .lta and deform transforms as .mgz, otherwise: "ValueError: cannot determine file format from extension for test__init_warp.txt";
while when using mri_synthform from my local freesurfer installation, it doesn't seem like an issue. While I expected .m3z to be the expected output.
-
Here is the sequence of functions I use. My objective is to pass down the resulting transform (affine initialization + deform warp) downstream my pipeline for further registration using ANTs (antsApplyTransforms). I tested and it seems to work, but i would
appreciate an opinion. Does the --insrcgeom parameter fixes everything for me?
-
mri_synthmorph -m affine -t <init.lta> [moving] [fixed]
mri_synthmorph -m deform -t <freesurfer_warp.mgz> -o <warped.nii.gz> -i <init.txt> [moving] [fixed]
Convert warp from freesurfer (RAS) to ANTs (LPS) using freesurfer warp_convert:
mri_warp_convert -g [moving] --inras <freesurfer_warp.mgz> --outlps <ants_warp.nii.gz>
Thank you very much!