Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ EXAMPLE_NOTEBOOKS = getting_started_io/00_test_installation.ipynb \
head_models/46_precompute_fluence.ipynb \
head_models/48_headmodel_landmarks_verification.ipynb \
head_models/51_spring_relaxation_registration.ipynb \
head_models/52_mni_atlas_labels_aal3_brodmann.ipynb \
augmentation/61_synthetic_artifacts_example.ipynb \
augmentation/62_synthetic_hrfs_example.ipynb \
physio/71_ampd_heartbeat.ipynb \
Expand Down
858 changes: 858 additions & 0 deletions examples/head_models/52_mni_atlas_labels_aal3_brodmann.ipynb

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions src/cedalion/bibliography/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,25 @@ @article{Luke2025
doi = {10.1038/s41597-024-04136-9},
}

@article{Rolls2020,
title = {Automated anatomical labelling atlas 3},
journal = {NeuroImage},
volume = {206},
pages = {116189},
year = {2020},
issn = {1053-8119},
doi = {https://doi.org/10.1016/j.neuroimage.2019.116189},
author = {Edmund T. Rolls and Chu-Chung Huang and Ching-Po Lin and Jianfeng Feng and Marc Joliot},
}

@book{Mai2017,
title = {Human Brain in Standard {{MNI}} Space: Structure and Function: A Comprehensive Pocket Atlas},
shorttitle = {Human Brain in Standard {{MNI}} Space},
author = {Mai, J{\"u}rgen K. and Majtanik, Milan},
year = 2017,
publisher = {Academic Press, an imprint of Elsevier},
address = {London ; San Diego, CA},
isbn = {978-0-12-811275-5},
lccn = {RC386.6.M34 M347 2017},
}

35 changes: 34 additions & 1 deletion src/cedalion/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,37 @@ def get(fname: str | Path) -> Path:
return files("cedalion.data").joinpath(fname)


@dataclass
class AtlasFiles:
"""Paths for a bundled atlas volume and label lookup."""

basedir: Path
nifti: Path
labels_json: Path


def get_aal3_atlas_files() -> AtlasFiles:
"""Return paths to the bundled AAL3 atlas volume and label lookup."""

atlas_dir = get("atlases/aal3")
return AtlasFiles(
basedir=atlas_dir,
nifti=atlas_dir / "ROI_MNI_V7_1mm.nii",
labels_json=atlas_dir / "aal_labels.json",
)


def get_brodmann_atlas_files() -> AtlasFiles:
"""Return paths to the bundled Brodmann atlas volume and label lookup."""

atlas_dir = get("atlases/brodmann")
return AtlasFiles(
basedir=atlas_dir,
nifti=atlas_dir / "Brodmann_Mai_Matajnik.nii",
labels_json=atlas_dir / "brodmann_labels.json",
)


def get_ninja_cap_probe():
"""Load the fullhead Ninja NIRS cap probe."""

Expand Down Expand Up @@ -544,10 +575,12 @@ def get_atlas_files(atlas : str) -> tuple[Path, Path]:
fnames = DATASETS.fetch("atlas_aal3.zip", processor=pooch.Unzip())
fname_volume = [Path(i) for i in fnames if i.endswith(".nii")][0]
fname_labels = [Path(i) for i in fnames if i.endswith(".json")][0]
cite("Rolls2020")
elif atlas == "brodmann":
fnames = DATASETS.fetch("atlas_aal3.zip", processor=pooch.Unzip())
fnames = DATASETS.fetch("atlas_brodmann.zip", processor=pooch.Unzip())
fname_volume = [Path(i) for i in fnames if i.endswith(".nii")][0]
fname_labels = [Path(i) for i in fnames if i.endswith(".json")][0]
cite("Mai2017")
else:
raise ValueError(f"atlas must be one of {AVAILABLE_ATLASES}")

Expand Down
Binary file added src/cedalion/data/atlases/aal3/ROI_MNI_V7_1mm.nii
Binary file not shown.
Loading
Loading