Skip to content

constants

tit.atlas.constants

Atlas constants shared across the TI-Toolbox.

mni_resources_dir

mni_resources_dir() -> str

MNI_ATLAS_DIR if it exists, else the repo-relative fallback.

Same resolution as :mod:tit.opt.roi_spec uses, so the bundled MNI atlases, LUTs and template are found whether the caller runs inside the container (/ti-toolbox/resources/atlas) or from a host checkout.

Source code in tit/atlas/constants.py
def mni_resources_dir() -> str:
    """``MNI_ATLAS_DIR`` if it exists, else the repo-relative fallback.

    Same resolution as :mod:`tit.opt.roi_spec` uses, so the bundled MNI
    atlases, LUTs and
    template are found whether the caller runs inside the container
    (``/ti-toolbox/resources/atlas``) or from a host checkout.
    """
    if os.path.isdir(MNI_ATLAS_DIR):
        return MNI_ATLAS_DIR
    return str(Path(__file__).resolve().parents[2] / "resources" / "atlas")