- mne.transforms.compute_volume_registration(moving, static, pipeline='all', zooms=None, niter=None, verbose=None)¶
Align two volumes using an affine and, optionally, SDR.
- movinginstance of
The image to morph (“from” volume).
- staticinstance of
The image to align with (“to” volume).
The volume registration steps to perform (a
strfor a single step, or
tuplefor a set of sequential steps). The following steps can be performed, and do so by matching mutual information between the images (unless otherwise noted):
Rigid-body, i.e., rotation and translation.
A full affine transformation, which includes translation, rotation, scaling, and shear.
Symmetric diffeomorphic registration 1, a non-linear similarity-matching algorithm.
The following string shortcuts can also be used:
All steps will be performed above in the order above, i.e.,
('translation', 'rigid', 'affine', 'sdr').
The rigid steps (first two) will be performed, which registers the volume without distorting its underlying structure, i.e.,
('translation', 'rigid'). This is useful for example when registering images from the same subject, such as CT and MR images.
The affine steps (first three) will be performed, i.e., omitting the SDR step.
The voxel size of volume for each spatial dimension in mm. If None (default), MRIs won’t be resliced (slow, but most accurate). Can be a tuple to provide separate zooms for each dimension (X/Y/Z), or a dict with keys
['translation', 'rigid', 'affine', 'sdr'](each with values that are float`, tuple, or None) to provide separate reslicing/accuracy for the steps.
For each phase of the volume registration,
niteris the number of iterations per successive stage of optimization. If a tuple is provided, it will be used for all steps (except center of mass, which does not iterate). It should have length 3 to correspond to
sigmas=[3.0, 1.0, 0.0]and
factors=[4, 2, 1]in the pipeline (see
dipy.align.affine_registrationfor details). If a dictionary is provided, number of iterations can be set for each step as a key. Steps not in the dictionary will use the default value. The default (None) is equivalent to:
- niter=dict(translation=(10000, 1000, 100),
rigid=(10000, 1000, 100), affine=(10000, 1000, 100), sdr=(10, 10, 5))
- verbosebool |
- movinginstance of
This function is heavily inspired by and extends
New in version 0.24.