mri_synthmorph-register NAME mri_synthmorph-register - register 3D brain images without preprocessing SYNOPSIS mri_synthmorph register [options] moving fixed DESCRIPTION SynthMorph is a deep-learning tool for symmetric, acquisition-agnostic registration of brain MRI with any volume size, resolution, and orientation. The registration is anatomy-aware, removing the need for skull-stripping, and you can control the warp smoothness. SynthMorph registers a moving (source) image to a fixed (target) image. Their geometries can differ. The options are as follows: -m model Transformation model (joint, deform, affine, rigid). Defaults to joint. Joint includes affine and deformable but differs from running both in sequence in that it applies the deformable step in an affine mid-space to guarantee symmetric joint transforms. Deformable assumes prior affine alignment or initialization with -i. -o image Save moving registered to fixed. -O image Save fixed registered to moving. -H Update the voxel-to-world matrix instead of resampling when saving images with -o and -O. For matrix transforms only. Not all software supports headers with shear from affine registration. -t trans Save the transform from moving to fixed, including any initialization. -T trans Save the transform from fixed to moving, including any initialization. -i trans Apply an initial matrix transform to moving before the registration. -M Apply half the initial matrix transform to moving and (the inverse of) the other half to fixed, for symmetry. This will make running the deformable after an affine step equivalent to joint registration. Requires -i. -j threads Number of TensorFlow threads. System default if unspecified. -g Use the GPU in environment variable CUDA_VISIBLE_DEVICES or GPU 0 if the variable is unset or empty. -r lambda Regularization parameter in the open interval (0, 1) for deformable registration. Higher values lead to smoother warps. Defaults to 0.5. -n steps Integration steps for deformable registration. Lower numbers improve speed and memory use but can lead to inaccuracies and folding voxels. Defaults to 7. Should not be less than 5. -e extent Isotropic extent of the registration space in unit voxels (192, 256). Lower values improve speed and memory use but may crop the anatomy of interest. Defaults to 256. -w weights Use alternative model weights, exclusively. Repeat the flag to set affine and deformable weights for joint registration, or the result will disappoint. -h Print this help text and exit. ENVIRONMENT The following environment variables affect mri_synthmorph-register: CUDA_VISIBLE_DEVICES Use a specific GPU. If unset or empty, passing -g will select GPU 0. Ignored without -g. FREESURFER_HOME Load model weights from directory FREESURFER_HOME/models. Ignored when specifying weights with -w. EXAMPLES Joint affine-deformable registration, saving the moved image: # mri_synthmorph register -o out.nii mov.nii fix.nii Joint registration at 25% warp smoothness: # mri_synthmorph register -r 0.25 -o out.nii mov.nii fix.nii Affine registration saving the transform: # mri_synthmorph register -m affine -t aff.lta mov.nii.gz fix.nii.gz Deformable registration only, assuming prior affine alignment: # mri_synthmorph register -m deform -t def.mgz mov.mgz fix.mgz Deformable step initialized with an affine transform: # mri_synthmorph reg -m def -i aff.lta -o out.mgz mov.mgz fix.mgz Rigid registration, setting the output image header (no resampling): # mri_synthmorph register -m rigid -Ho out.mgz mov.mgz fix.mgz