AFQ.data.fetch#

Module Contents#

Functions#

read_callosum_templates(as_img=True, resample_to=False)

Load AFQ callosum templates from file

read_templates(as_img=True, resample_to=False)

Load AFQ templates from file

read_or_templates(as_img=True, resample_to=False)

Load AFQ OR templates from file

read_stanford_hardi_tractography()

Reads a minimal tractography from the Stanford dataset.

organize_stanford_data(path=None, clear_previous_afq=False)

If necessary, downloads the Stanford HARDI dataset into DIPY directory and

Attributes#

fetch_callosum_templates

fetch_templates

fetch_or_templates

fetch_stanford_hardi_tractography

AFQ.data.fetch.fetch_callosum_templates[source]#
AFQ.data.fetch.read_callosum_templates(as_img=True, resample_to=False)[source]#

Load AFQ callosum templates from file

Parameters
as_imgbool, optional

If True, values are Nifti1Image. Otherwise, values are paths to Nifti files. Default: True

resample_tostr or nibabel image class instance, optional

A template image to resample to. Typically, this should be the template to which individual-level data are registered. Defaults to the MNI template. Default: False

Returns
dict with: keys: names of template ROIs and values: nibabel Nifti1Image
objects from each of the ROI nifti files.
AFQ.data.fetch.fetch_templates[source]#
AFQ.data.fetch.read_templates(as_img=True, resample_to=False)[source]#

Load AFQ templates from file

Parameters
as_imgbool, optional

If True, values are Nifti1Image. Otherwise, values are paths to Nifti files. Default: True

resample_tostr or nibabel image class instance, optional

A template image to resample to. Typically, this should be the template to which individual-level data are registered. Defaults to the MNI template. Default: False

Returns
dict with: keys: names of template ROIs and values: nibabel Nifti1Image
objects from each of the ROI nifti files.
AFQ.data.fetch.fetch_or_templates[source]#
AFQ.data.fetch.read_or_templates(as_img=True, resample_to=False)[source]#

Load AFQ OR templates from file

Parameters
as_imgbool, optional

If True, values are Nifti1Image. Otherwise, values are paths to Nifti files. Default: True

resample_tostr or nibabel image class instance, optional

A template image to resample to. Typically, this should be the template to which individual-level data are registered. Defaults to the MNI template. Default: False

Returns
dict with: keys: names of template ROIs and values: nibabel Nifti1Image
objects from each of the ROI nifti files.
AFQ.data.fetch.fetch_stanford_hardi_tractography[source]#
AFQ.data.fetch.read_stanford_hardi_tractography()[source]#

Reads a minimal tractography from the Stanford dataset.

AFQ.data.fetch.organize_stanford_data(path=None, clear_previous_afq=False)[source]#

If necessary, downloads the Stanford HARDI dataset into DIPY directory and creates a BIDS compliant file-system structure in AFQ data directory:

~/AFQ_data/ └── stanford_hardi ├── dataset_description.json └── derivatives

├── freesurfer │ ├── dataset_description.json │ └── sub-01 │ └── ses-01 │ └── anat │ ├── sub-01_ses-01_T1w.nii.gz │ └── sub-01_ses-01_seg.nii.gz └── vistasoft

├── dataset_description.json └── sub-01

└── ses-01
└── dwi

├── sub-01_ses-01_dwi.bval ├── sub-01_ses-01_dwi.bvec └── sub-01_ses-01_dwi.nii.gz

If clear_previous_afq is True and there is an afq folder in derivatives, it will be removed.