This is a program that preforms a linear registration between two volumes in a way that should more-or-less replicate spm_coreg as called by the FreeSurfer program spmregister.


mri_coreg --mov <movvol> --ref <refvol> --reg reg.lta [options]


Required Flagged Arguments

--mov movvol

Source volume

--ref refvol

Target volume (can use --targ also)

--reg reg.lta

Output registration (can use --lta too)

Optional Flagged Arguments

--s subject

forces --ref-mask aparc+aseg.mgz

--dof DOF

Default is 6 (also: --6, --9, --12)

--ref-mask refmaskvol

Mask ref with refmaskvol


Do not mask ref (good to undo aparc+aseg.mgz, put AFTER --s)

--mov-mask movmaskvol

Mask ref with movmaskvol

--threads nthreads


--regdat reg.dat


Turn off coordinate dithering


Turn off intensity dithering

--sep voxsep1 <--sep voxsep2>

Set spatial scales (def is 2 vox and 4 vox)

--trans Tx Ty Tz

Initial translation in mm (implies --no-cras0)

--rot Rx Ry Rz

Initial rotation in deg

--shear Hxy Hxz Hyz

Initial shear

--params outparamfile

Save parameters in this file


Do not set translation parameters to align centers of mov and ref


Same as no-cras0

--nitersmax n

Default is 4

--ftol ftol

Default is 1.000e-07

--linmintol linmintol

Default is 1.000e-03

--sat SatPct

Saturation threshold, default is 9.999+01


Conform the reference without rescaling (good for gca)


Do not do brute force search

--bf-lim lim

Constrain brute force search to +/- lim

--bf-nsamp nsamples

Number of samples in brute force search


Do not apply smoothing to either ref or mov

--ref-fwhm fwhm

Apply smoothing to ref


Count mov voxels that are out-of-bounds as 0


Do not count mov voxels that are out-of-bounds as 0 (default)

--mat2par reg.lta

Extract parameters out of registration


Turn on debugging


Do not run anything, just check options and exit


Print out information on how to use this program


Print out version and exit







Reporting Bugs

Report bugs to <>

mri_coreg (last edited 2017-12-05 15:58:22 by MorganFogarty)