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/2014205c296dca5a1a2715b6b9b6d73fc553a514.

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-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Josh 
<nimzodisas...@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 
<nimzodisas...@gmail.com<mailto:nimzodisas...@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



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
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. 

Reply via email to