EasyReg and EasyAtlas

EasyReg became available in FreeSurfer 7.4

EasyAtlas is available in development versions from November 2025 and can also be downloaded independently (see first item in FAQ below)


Author: Juan Eugenio Iglesias

E-mail: jiglesiasgonzalez [at] mgh.harvard.edu

Rather than directly contacting the author, please post your questions on this module to the FreeSurfer mailing list at freesurfer [at] nmr.mgh.harvard.edu

If you use EasyReg or EasyAtlas in your analysis, please cite:

Since EasyReg builds on prior work, please cite this previous paper as well:


Contents

  1. General Description
  2. Installation
  3. Usage
  4. Frequently asked questions (FAQ)


1. General Description

EasyReg makes deep learning registration of brain MRI easy to use, while exhibiting the best features of classical and deep learning registration tools:

EasyAtlas uses EasyReg to iteratively build brain a template from a set of brain MRI scan, and inherits all of EasyReg's advantages. Just throw all the scans into a directory, and press the button! On a powerful CPU, it takes about 1 min per scan in total (including segmentation, affine alignment, and iterative nonlinear alignment).



2. Installation

The first time you run this module, it may prompt you to install some packages; simply follow the instructions in the screen (please install the CPU version, if given the option).


3. Usage

You can use EasyReg with the following command:

mri_easyreg --ref <reference_image> --flo <floating_image>  \
            --ref_seg <ref_image_segmentation> --flo_seg <flo_image_segmentation>  \
            --ref_reg [deformed_ref_image] --flo_reg <deformed_flo_image>  \
            --fwd_field [forward_field] --bak_field <backward_field>  \
            --threads <number_of_threads> --affine_only

where:

We note that the segmentations are a (often useful) by-product of EasyReg. Also: once the segmentation file has been written, EasyReg can register the corresponding scan to other cases without having to segment it again.


You can use EasyAtlas with the following command:

mri_easyatlas --i <input_directory> --o <output_directory> --threads <number_of_threads> --use_reliability_maps

where:

EasyAtlas will write in the output directory:


If you want to apply a deformation field from EasyReg or EasyAtlas to a different image (e.g., a segmentation, to propagate labels to another space), you can run:

mri_easywarp --i <input_image> --o <output_image> --field <field> --threads <number_of_threads> --nearest

where:

We note that the fields are specified in RAS, and therefore, can be used with images that do not necessarily live in the same voxel grid as those provided to mri_easyreg / mri_easyatlas - but must of course live in the same real-world (RAS) coordinates.


4. Frequently asked questions (FAQ)

No problem! You can download the python script from here (mri_easyatlas.py), source your existing FreeSurfer, and run the command:

fspython /path/to/mri_easyatlas.py --i <input_directory> --o <output_directory> --threads <number_of_threads> --use_reliability_maps

No! Because we applied aggressive augmentation during training (see paper), this tool is able to segment both processed and unprocessed data. So there is no need to apply bias field correction, skull stripping, or intensity normalisation.

This tool can be run on Nifti (.nii/.nii.gz) and FreeSurfer (.mgz) scans. Note that the fields are also .nii/.nii.gz/.mgz files.


EasyReg (last edited 2025-10-23 15:47:09 by JuanIglesias)