AFQ.definitions.mapping#

Module Contents#

Classes#

FnirtMap

Use an existing FNIRT map. Expects a warp file

ItkMap

Use an existing Itk map (e.g., from ANTS). Expects the warp file

SynMap

Calculate a Syn registration for each subject/session

SlrMap

Calculate a SLR registration for each subject/session

AffMap

Calculate an affine registration for each subject/session

class AFQ.definitions.mapping.FnirtMap(warp_path=None, space_path=None, warp_suffix=None, space_suffix=None, warp_filters={}, space_filters={})[source]#

Bases: AFQ.definitions.utils.Definition

Use an existing FNIRT map. Expects a warp file and an image file for each subject / session; image file is used as src space for warp.

Parameters
warp_pathstr, optional

path to file to get warp from. Use this or warp_suffix. Default: None

space_pathstr, optional

path to file to get warp from. Use this or space_suffix. Default: None

warp_suffixstr, optional

suffix to pass to bids_layout.get() to identify the warp file. Default: None

space_suffixstr, optional

suffix to pass to bids_layout.get() to identify the space file. Default: None

warp_filtersstr, optional

Additional filters to pass to bids_layout.get() to identify the warp file. Default: {}

space_filtersstr, optional

Additional filters to pass to bids_layout.get() to identify the space file. Default: {}

Examples

fnirt_map = FnirtMap(

warp_suffix=”warp”, space_suffix=”MNI”, warp_filters={“scope”: “TBSS”}, space_filters={“scope”: “TBSS”})

api.GroupAFQ(mapping=fnirt_map)

find_path(bids_layout, from_path, subject, session)[source]#
get_for_subses(base_fname, dwi, bids_info, reg_subject, reg_template)[source]#
class AFQ.definitions.mapping.ItkMap(warp_path=None, warp_suffix=None, warp_filters={})[source]#

Bases: AFQ.definitions.utils.Definition

Use an existing Itk map (e.g., from ANTS). Expects the warp file from MNI to T1.

Parameters
warp_pathstr, optional

path to file to get warp from. Use this or warp_suffix. Default: None

warp_suffixstr, optional

suffix to pass to bids_layout.get() to identify the warp file.

warp_filtersstr, optional

Additional filters to pass to bids_layout.get() to identify the warp file. Default: {}

Examples

itk_map = ItkMap(

warp_suffix=”xfm”, warp_filters={

“scope”: “qsiprep”, “from”: “MNI152NLin2009cAsym”, “to”: “T1w”})

api.GroupAFQ(mapping=itk_map)

find_path(bids_layout, from_path, subject, session)[source]#
get_for_subses(base_fname, dwi, bids_info, reg_subject, reg_template)[source]#
class AFQ.definitions.mapping.SynMap(use_prealign=True, affine_kwargs={}, syn_kwargs={})[source]#

Bases: GeneratedMapMixin, AFQ.definitions.utils.Definition

Calculate a Syn registration for each subject/session using reg_subject and reg_template.

Parameters
use_prealignbool

Whether to perform a linear pre-registration. Default: True

affine_kwargsdictionary, optional

Parameters to pass to affine_registration in dipy.align, which does the linear pre-alignment. Only used if use_prealign is True. Default: {}

syn_kwargsdictionary, optional

Parameters to pass to syn_registration in dipy.align, which does the SyN alignment. Default: {}

Examples
——–
api.GroupAFQ(mapping=SynMap())
find_path(bids_layout, from_path, subject, session)[source]#
gen_mapping(base_fname, reg_subject, reg_template, subject_sls, template_sls, reg_prealign)[source]#
class AFQ.definitions.mapping.SlrMap(slr_kwargs={})[source]#

Bases: GeneratedMapMixin, AFQ.definitions.utils.Definition

Calculate a SLR registration for each subject/session using reg_subject and reg_template.

slr_kwargsdictionary, optional

Parameters to pass to whole_brain_slr in dipy, which does the SLR alignment. Default: {}

Examples

api.GroupAFQ(mapping=SlrMap())

find_path(bids_layout, from_path, subject, session)[source]#
gen_mapping(base_fname, reg_template, reg_subject, subject_sls, template_sls, reg_prealign)[source]#
class AFQ.definitions.mapping.AffMap(affine_kwargs={})[source]#

Bases: GeneratedMapMixin, AFQ.definitions.utils.Definition

Calculate an affine registration for each subject/session using reg_subject and reg_template.

affine_kwargsdictionary, optional

Parameters to pass to affine_registration in dipy.align, which does the linear pre-alignment. Default: {}

Examples

api.GroupAFQ(mapping=AffMap())

find_path(bids_layout, from_path, subject, session)[source]#
gen_mapping(base_fname, reg_subject, reg_template, subject_sls, template_sls, reg_prealign)[source]#