CLI reference¶
The project exposes a small set of user-facing commands. The homepage README contains the full usage walkthroughs; this page gives a quick command index and points to the backing Python modules documented in CLI modules.
robreg¶
IRLS-backed robust image-to-image registration for same-contrast or closely-related contrast pairs.
Example:
robreg --mov moving.nii.gz --ref fixed.nii.gz --out moving_to_fixed.lta
multireg¶
Longitudinal multi-timepoint template construction with reusable LTAs for later template rebuilds.
Examples:
multireg --mov tp1.mgz tp2.mgz tp3.mgz --template subject_template.mgz \
--lta tp1.lta tp2.lta tp3.lta --average median
multireg --mov tp1_orig.mgz tp2_orig.mgz tp3_orig.mgz \
--template subject_template_orig.mgz \
--ixforms tp1.lta tp2.lta tp3.lta --noit --average median
coreg¶
Image-based cross-modal registration when only images are available.
Example:
coreg --mov moving.nii.gz --ref fixed.nii.gz --out moving_to_fixed.lta --dof 6
bbreg¶
Boundary-based registration using cortical surfaces or a segmentation-derived surface pair.
Example:
bbreg --mov bold.nii.gz --subject_dir /path/to/subject --out bold_to_t1.lta
vol2vol¶
Apply a linear transform to an image, reslice to a target geometry, or update the header only without interpolation. The transform argument is optional, so the command also covers identity reslicing, dtype conversion, and final output intensity remapping.
Examples:
vol2vol --mov bold.nii.gz --transform bold_to_t1.lta --ref T1.mgz --out bold_in_t1.nii.gz
vol2vol --mov aseg.mgz --ref orig.mgz --interp nearest --keep-dtype --out aseg_in_orig.mgz
vol2vol --mov bold.nii.gz --transform bold_to_t1.lta --header-only --out bold_header_in_t1.nii.gz
mri¶
Image-volume utilities grouped under a single command, analogous to FreeSurfer’s
mri_mask, mri_info, mri_diff, and mri_binarize.
mask — apply a binary mask to a volume:
mri mask input.nii.gz mask.nii.gz output.nii.gz
mri mask input.mgz brain_mask.mgz masked.mgz -T 0.5
info — print header and geometry information:
mri info T1.mgz
mri info T1.mgz --dim --res --orientation
diff — compare two volumes and exit nonzero when they differ:
mri diff vol1.mgz vol2.mgz
mri diff vol1.mgz vol2.mgz --thresh 1e-4 --count
mri diff tp1.mgz tp2.mgz --skip-geo --skip-pix --res-thresh 0.000001
binarize — binarize by intensity range or matched label values:
mri binarize --i aseg.mgz --o wm_mask.mgz --match 2 41
mri binarize --i T1.mgz --o brain_bin.mgz --min 10 --uchar
mri binarize --i T1.mgz --o bg.mgz --min 10 --inv
lta¶
Utilities for comparing, concatenating, inverting, and converting
FreeSurfer-adjacent linear transform files. The convert subcommand supports
.lta, .xfm, volumetric tkregister .dat/.reg, FSL FLIRT
.mat/.fslmat, ITK/ANTs 3D affine text .tfm, experimental ANTs
*GenericAffine.mat, experimental AFNI .aff12.1D, and NiftyReg affine
text matrices.
Examples:
lta diff reg1.lta reg2.lta
lta invert in.lta out.lta
lta concat a_to_b.lta b_to_c.lta a_to_c.lta
lta convert talairach.xfm talairach.lta --src-img mov.mgz --dst-img ref.mgz
lta convert bold_to_orig.mat bold_to_orig.lta --src-img bold.nii.gz --dst-img orig.mgz
lta convert bold_to_orig.txt bold_to_orig.lta --in-format itk --src-img bold.nii.gz --dst-img orig.mgz
lta convert bold_to_orig0GenericAffine.mat bold_to_orig_from_antsmat.lta
lta convert bold_to_orig.aff12.1D bold_to_orig_from_afni.lta
lta convert bold_to_orig.txt bold_to_orig_from_niftyreg.lta --in-format niftyreg
neuroreg-sys_info¶
Print package, dependency, and runtime information useful for debugging installations and CI environments.
Example:
neuroreg-sys_info --developer