AFQ.registration

Registration tools

Module Contents

Functions

syn_register_dwi(dwi, gtab, template=None, **syn_kwargs)

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=None)

Read a syn registration mapping from a nifti file

register_dwi(data_files, bval_files, bvec_files, b0_ref=0, pipeline=[center_of_mass, translation, rigid, affine], out_dir=None)

Register a DWI data-set

slr_registration(moving_data, static_data, moving_affine=None, static_affine=None, moving_shape=None, static_shape=None, **kwargs)

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
A DiffeomorphicMap object
AFQ.registration.register_dwi(data_files, bval_files, bvec_files, b0_ref=0, pipeline=[center_of_mass, translation, rigid, affine], out_dir=None)[source]

Register a DWI data-set

Parameters
data_filesstr or list

Files containing DWI data. If this is a str, that’s the full path to a single file. If it’s a list, each entry is a full path.

bval_filesstr or list

Equivalent to data_files.

bvec_filesstr or list

Equivalent to data_files.

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