The `--inmgzwarp` flag likely didn't make it into the 7.4.1 release in June 2023, as the commit adding it was made in July 2023: https://github.com/freesurfer/freesurfer/commit/2014205c296dca5a1a2715b6b9b6....
You are correct that SynthMorph warps are both in MGZWARP format and RAS displacements (which are not generally equivalent). You can use `--inras`, as long as you also specify the source geometry:
mri_warp_convert -g moving.nii--inras synthmorph.nii--outitk ants.nii
________________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Josh nimzodisaster@gmail.com Sent: Monday, December 16, 2024 18:11 To: Freesurfer support list Subject: Re: [Freesurfer] needed: tools to work with synthmorph deformations in ANTS and FSL pipelines.
External Email - Use Caution
For some reason the replies I see on the mail archive are not showing up in my mail server.
I am using synthmorph from its latest docker freesurfer/synthmorph:latest and am trying to use the mri_convert_warp from docker image freesurfer/freesurfer:7.4.1, with this command: mri_warp_convert --inmgzwarp 106682-100.nii_to_template_final_deform.nii.gz --outitk test.nii.gz and I get ERROR: Option: --INMGZWARP unknown (see --help) !!
Is this option newer than 7.4.1? Also synthmorph documentation says deformation are in RAS space, so mri_warp_convert --inras warp.nii.gz --outitk warp.nii.gz ?
On Wed, Dec 11, 2024 at 3:50 PM Josh <nimzodisaster@gmail.commailto:nimzodisaster@gmail.com> wrote: mri_synthmorph is simply an amazing SOTA tool that I want to incorporate into all my pipelines. However, I am unsure how to convert the combined affine+nonlinear deformation image into a format that can be worked with by ants or FSL.
Optimally, synthmorph + lta_convert + mri_convert would provide tools to: 1. separate affine and nonlinear components of the registration (useful in certain applications) 2. convert freesurfer transforms to current standard formats (FSL and ITK ants)
-Josh