AFQ.registration#

Registration tools

Module Contents#

Functions#

syn_register_dwi(dwi, gtab[, template])

Register DWI data to a template.

write_mapping(mapping, fname)

Write out a syn registration mapping to file

read_mapping(disp, domain_img, codomain_img[, prealign])

Read a syn registration mapping from a nifti file

slr_registration(moving_data, static_data[, ...])

Register a source image (moving) to a target image (static).

AFQ.registration.syn_register_dwi(dwi, gtab, template=None, **syn_kwargs)[source]#

Register DWI data to a template.

Parameters
dwinifti image or str

Image containing DWI data, or full path to a nifti file with DWI.

gtabGradientTable or list of strings

The gradients associated with the DWI data, or a string with [fbcal, ]

templatenifti image or str, optional
syn_kwargskey-word arguments for syn_registration()
Returns
DiffeomorphicMap object
AFQ.registration.write_mapping(mapping, fname)[source]#

Write out a syn registration mapping to file

Parameters
mappinga DiffeomorphicMap object derived from syn_registration()
fnamestr

Full path to the nifti file storing the mapping

AFQ.registration.read_mapping(disp, domain_img, codomain_img, prealign=None)[source]#

Read a syn registration mapping from a nifti file

Parameters
dispstr, Nifti1Image, or ndarray

If string, file must of an image or ndarray. If image, contains the mapping displacement field in each voxel Shape (x, y, z, 3, 2) If ndarray, contains affine transformation used for mapping

domain_imgstr or Nifti1Image
codomain_imgstr or Nifti1Image
Returns
Aclass:DiffeomorphicMap object
AFQ.registration.slr_registration(moving_data, static_data, moving_affine=None, static_affine=None, moving_shape=None, static_shape=None, **kwargs)[source]#

Register a source image (moving) to a target image (static).

Parameters
movingndarray

The source tractography data to be registered

moving_affinendarray

The affine associated with the moving (source) data.

moving_shapendarray

The shape of the space associated with the static (target) data.

staticndarray

The target tractography data for registration

static_affinendarray

The affine associated with the static (target) data.

static_shapendarray

The shape of the space associated with the static (target) data.

**kwargs:

kwargs are passed into whole_brain_slr

Returns
AffineMap