AFQ.data.fetch#

Module Contents#

Functions#

read_callosum_templates([as_img, resample_to])

Load AFQ callosum templates from file

read_templates([as_img, resample_to])

Load AFQ templates from file

read_or_templates([as_img, resample_to])

Load AFQ OR templates from file

read_stanford_hardi_tractography()

Reads a minimal tractography from the Stanford dataset.

organize_stanford_data([path, clear_previous_afq])

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

Attributes#

fetch_callosum_templates

fetch_templates

fetch_or_templates

fetch_stanford_hardi_tractography

fetch_stanford_hardi_lv1

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

Parameters
pathstr or None

Path to download dataset to, by default it is ~/AFQ_data/.

clear_previous_afqstr or None

Whether to clear previous afq results in the stanford hardi dataset. If not None, can be “all”, “track”, “recog”, “prof”. Default: None

AFQ.data.fetch.fetch_stanford_hardi_lv1[source]#