Skip to content

registration_convert

convert

Freesurfer transform conversion tool. Default usage is aim at receiving freesurfer format and converting to ANTs (ITK). See lta_convert —help and mri_warp_convert —help for options. Conversion preserves the supplied transformation’s direction; select the forward or backward transformation and its matching geometry explicitly in the workflow. Input and output transformation types must differ.

Keywords : Registration, Brain imaging, MRI, Conversion


Format : tuple val(meta), path(transformation), val(input_type), val(output_type), path(reference), path(affine_source), path(fs_license)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'test', single_end:false ]
True
transformationfileInput transformation to convert.True*.{nii,nii.gz,mgz,m3z,lta,txt,xfm,dat}
input_typestringType of input transformation :
- affine : lta, fsl, mni, reg, niftyreg, itk, vox
- deform : m3z, fsl, lps, itk, ras, vox
True
output_typestringType of output transformation :
- affine : lta, fsl, mni, reg, niftyreg, itk
- deform : m3z, fsl, lps, itk, ras, vox
True
referencefileReference volume used for registration. For affine transformations, it’s usually the target image, and for warp the moving (source) image. Validate with the tools you used to generate the transformation.
True*.{nii,nii.gz}
affine_sourcefileMoving (source) Nifti volume used for registration. Required for affine conversion from any non-LTA input format, and conversion to the LTA format. Unused for warp conversion.False*.{nii,nii.gz}
fs_licensefileThe path to your FreeSurfer license. To get one, go to https://surfer.nmr.mgh.harvard.edu/registration.html. Optional. If you have already set your license as prescribed by Freesurfer (copied to a .license file in your $FREESURFER_HOME), this is not required.True*.txt

Format : tuple val(meta), path(*out_{affine,warp}.{nii,nii.gz,mgz,m3z,txt,lta,mat,dat})

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'test', single_end:false ]
True
*out_{affine,warp}.{nii,nii.gz,mgz,m3z,txt,lta,mat,dat}fileAffine or warp converted to the desired format.True*out_{affine,warp}.{nii,nii.gz,mgz,m3z,txt,lta,mat,dat}

Format : path(versions.yml)

TypeDescriptionMandatoryPattern
versions.ymlfileFile containing software versionsTrueversions.yml

TypeDescriptionDefaultChoices
conformbooleanFOR AFFINE CONVERSION ONLY. Conform target geometry before conversion (see freesurfer documentation).False
downsamplebooleanFOR WARP CONVERSION ONLY. Downsample output M3Z to spacing of 2.False
single_threadbooleanIf true, the command will be run in single-threaded mode. By default, the command will use multiple threads based on the number of CPUs allocated to the task.False

DescriptionDOI
FreesurferOpen source neuroimaging toolkit for processing, analyzing, and visualizing human brain MR images.
10.1016/j.neuroimage.2012.01.021


Last updated : 2026-11-23