:py:mod:`AFQ.data.fetch` ======================== .. py:module:: AFQ.data.fetch Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: AFQ.data.fetch.read_callosum_templates AFQ.data.fetch.read_templates AFQ.data.fetch.read_or_templates AFQ.data.fetch.read_stanford_hardi_tractography AFQ.data.fetch.organize_stanford_data Attributes ~~~~~~~~~~ .. autoapisummary:: AFQ.data.fetch.fetch_callosum_templates AFQ.data.fetch.fetch_templates AFQ.data.fetch.fetch_or_templates AFQ.data.fetch.fetch_stanford_hardi_tractography AFQ.data.fetch.fetch_stanford_hardi_lv1 .. py:data:: fetch_callosum_templates .. py:function:: read_callosum_templates(as_img=True, resample_to=False) Load AFQ callosum templates from file :Parameters: **as_img** : bool, optional If True, values are `Nifti1Image`. Otherwise, values are paths to Nifti files. Default: True **resample_to** : str 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. .. .. !! processed by numpydoc !! .. py:data:: fetch_templates .. py:function:: read_templates(as_img=True, resample_to=False) Load AFQ templates from file :Parameters: **as_img** : bool, optional If True, values are `Nifti1Image`. Otherwise, values are paths to Nifti files. Default: True **resample_to** : str 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. .. .. !! processed by numpydoc !! .. py:data:: fetch_or_templates .. py:function:: read_or_templates(as_img=True, resample_to=False) Load AFQ OR templates from file :Parameters: **as_img** : bool, optional If True, values are `Nifti1Image`. Otherwise, values are paths to Nifti files. Default: True **resample_to** : str 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. .. .. !! processed by numpydoc !! .. py:data:: fetch_stanford_hardi_tractography .. py:function:: read_stanford_hardi_tractography() Reads a minimal tractography from the Stanford dataset. .. !! processed by numpydoc !! .. py:function:: organize_stanford_data(path=None, clear_previous_afq=None) 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: **path** : str or None Path to download dataset to, by default it is ~/AFQ_data/. **clear_previous_afq** : str or None Whether to clear previous afq results in the stanford hardi dataset. If not None, can be "all", "track", "recog", "prof". Default: None .. !! processed by numpydoc !! .. py:data:: fetch_stanford_hardi_lv1