External Email - Use Caution
I am trying to apply the synthmorph deformation fields using other tools so that I can combine multiple warps, use spline interpolation, etc. I have tried a few variations of the mri_convert and mri_warp_convert commands, but they either crash or result it skewed or otherwise incorrect outputs. Is there an example out there showing exactly what syntax I should use to convert a synthmorph deform.nii.gz output to something that can work with freesurfer mri_warp_convert, or with FSL or ANTs?
-Keith
You can convert a SynthMorph deformation field warp-sm.nii.gz to ITK/ANTs format using mri_warp_convert from a recent FreeSurfer release:
mri_warp_convert -g moving.nii.gz --inras warp-sm.nii.gz --outitk warp-itk.nii.gz
This warp can then be applied with ANTs tools, for example:
antsApplyTransforms -d 3 -i moving.nii.gz -r fixed.nii.gz -o moved.nii.gz -t warp-itk.nii.gz
________________________________________ From: Keith Jamison kwj2001@med.cornell.edu Sent: Monday, October 20, 2025 18:07 To: freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Applying synthmorph deformations using other tools
External Email - Use Caution I am trying to apply the synthmorph deformation fields using other tools so that I can combine multiple warps, use spline interpolation, etc. I have tried a few variations of the mri_convert and mri_warp_convert commands, but they either crash or result it skewed or otherwise incorrect outputs. Is there an example out there showing exactly what syntax I should use to convert a synthmorph deform.nii.gz output to something that can work with freesurfer mri_warp_convert, or with FSL or ANTs?
-Keith
External Email - Use Caution
Exactly what I needed. Thank you!
For anyone else coming along who might need it, this output can be further converted to FSL using: wb_command -convert-warpfield -from-itk warp-itk.nii.gz -to-fnirt warp-fsl.nii.gz moving.nii.gz
-Keith
From: Hoffmann, Malte,PhD MHOFFMANN@mgh.harvard.edu Date: Monday, October 20, 2025 at 5:56 PM To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu, Keith Jamison kwj2001@med.cornell.edu Subject: Re: Applying synthmorph deformations using other tools ⓘ Informational: External Sender This sender is external to Weill Cornell Medicine. Be careful when clicking links or opening attachments.
You can convert a SynthMorph deformation field warp-sm.nii.gz to ITK/ANTs format using mri_warp_convert from a recent FreeSurfer release:
mri_warp_convert -g moving.nii.gz --inras warp-sm.nii.gz --outitk warp-itk.nii.gz
This warp can then be applied with ANTs tools, for example:
antsApplyTransforms -d 3 -i moving.nii.gz -r fixed.nii.gz -o moved.nii.gz -t warp-itk.nii.gz
________________________________________ From: Keith Jamison kwj2001@med.cornell.edu Sent: Monday, October 20, 2025 18:07 To: freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Applying synthmorph deformations using other tools
External Email - Use Caution I am trying to apply the synthmorph deformation fields using other tools so that I can combine multiple warps, use spline interpolation, etc. I have tried a few variations of the mri_convert and mri_warp_convert commands, but they either crash or result it skewed or otherwise incorrect outputs. Is there an example out there showing exactly what syntax I should use to convert a synthmorph deform.nii.gz output to something that can work with freesurfer mri_warp_convert, or with FSL or ANTs?
-Keith The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://secure-web.cisco.com/1azqY6ukN32rHqQt33Pti7bOO3wDEjIXQSFD6_pCdq-mbzY...https://secure-web.cisco.com/1Ph2XwGh2PkqpxzyUF2c3R2DiCHjLdLKCxbMNMRoQ_lPaDqKYyiPkT_6wtBX7K1PHguGzmxdrEE_p_Eq1PDRSU7hGXyc8Og-2W8aDwYGBhyM31EwfHITi4woUU2a9Rq46rDHENGWjxTKPDJZQjHhrvgf-i4X8hsMr-FsJqtgvB5D8_Zk1CWpAA2IE5vddStOhTuSBJ81avPSFS0ICrxB2L1wbP8uOeui7Sh9j3Mf5jNhbpndVAhPbhBBD7Vco9Pf6TuxJ2jnz5DdUZ629qIYmfJcPzIkxkLjxU8G1OaeT8T5GMPuNV7V2gqioTFp_zbPKCpWKaxtVvcVOlMlzXu_BMQ/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline <https://secure-web.cisco.com/14mESyok38pY4lS3Ik_f8BDylyF8CQRC4OfFq-uggaFVNsb...https://secure-web.cisco.com/1Ph2XwGh2PkqpxzyUF2c3R2DiCHjLdLKCxbMNMRoQ_lPaDqKYyiPkT_6wtBX7K1PHguGzmxdrEE_p_Eq1PDRSU7hGXyc8Og-2W8aDwYGBhyM31EwfHITi4woUU2a9Rq46rDHENGWjxTKPDJZQjHhrvgf-i4X8hsMr-FsJqtgvB5D8_Zk1CWpAA2IE5vddStOhTuSBJ81avPSFS0ICrxB2L1wbP8uOeui7Sh9j3Mf5jNhbpndVAhPbhBBD7Vco9Pf6TuxJ2jnz5DdUZ629qIYmfJcPzIkxkLjxU8G1OaeT8T5GMPuNV7V2gqioTFp_zbPKCpWKaxtVvcVOlMlzXu_BMQ/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.
freesurfer@nmr.mgh.harvard.edu