Fetching Atlases

transbrain.atlas.fetch_human_atlas(atlas_type='bn', region_type='all')[source]

Fetch a human brain atlas image and its region information.

This function loads a labeled brain atlas image (e.g., Brainnetome, Desikan-Killiany, or AAL) along with its corresponding ROI (region of interest) metadata table.

Parameters:
  • atlas_type ({'bn', 'dk', 'aal'}, optional) – The type of atlas to load. Must be one of: - ‘bn’ : Brainnetome Atlas - ‘dk’ : Desikan-Killiany Atlas - ‘aal’ : Automated Anatomical Labeling (AAL) Atlas Default is ‘bn’.

  • region_type ({'cortex', 'subcortex', 'all'}, optional) – Which regions to include in returned region names and info table: cortical, subcortical, or all. Default is ‘all’.

Returns:

A dictionary with the following keys:

  • ’atlas’nibabel.Nifti1Image

    The loaded NIfTI image of the atlas.

  • ’atlas_data’np.ndarray

    The atlas volume data as a NumPy array.

  • ’region_info’np.ndarray

    A list of anatomical region names, extracted from the ‘Anatomical Name’ column of the label file.

  • ’info_table’pandas.DataFrame

    The full region-of-interest (ROI) information table including additional metadata.

Return type:

dict

Raises:

FileNotFoundError – If the atlas image file or the ROI label file is not found.

transbrain.atlas.fetch_mouse_atlas(region_type='all')[source]

Fetch the mouse atlas data and related information.

This function loads the labeled mouse brain atlas image along with its corresponding ROI (region of interest) metadata table.

Parameters:

region_type ({'cortex', 'subcortex', 'all'}, optional) – Which regions to include in returned region names and info table: cortical, subcortical, or all. Default is ‘all’.

Returns:

A dictionary with the following keys:

  • ’atlas’nibabel.Nifti1Image

    The loaded NIfTI image of the mouse atlas.

  • ’atlas_data’np.ndarray

    The atlas volume data as a NumPy array.

  • ’region_info’np.ndarray

    A list of anatomical region names, extracted from the ‘Anatomical Name’ column of the label file.

  • ’info_table’pandas.DataFrame

    The full region-of-interest (ROI) information table including additional metadata.

Return type:

dict

Raises:

FileNotFoundError – If the atlas image file or the ROI label file is not found.