Skip to content

Commit af0138a

Browse files
committed
ENH: Temporarily add mcribs, dHCP templates
1 parent bd95dd8 commit af0138a

File tree

7 files changed

+479
-0
lines changed

7 files changed

+479
-0
lines changed

nibabies/data/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import atexit
2+
from contextlib import ExitStack
3+
from pathlib import Path
4+
5+
try:
6+
from functools import cache
7+
except ImportError: # PY38
8+
from functools import lru_cache as cache
9+
10+
try: # Prefer backport to leave consistency to dependency spec
11+
from importlib_resources import as_file, files
12+
except ImportError:
13+
from importlib.resources import as_file, files
14+
15+
__all__ = ["load_resource"]
16+
17+
exit_stack = ExitStack()
18+
atexit.register(exit_stack.close)
19+
20+
path = files(__package__)
21+
22+
23+
@cache
24+
def load_resource(fname: str) -> Path:
25+
return exit_stack.enter_context(as_file(path.joinpath(fname)))

nibabies/data/atlases/dHCP/dHCP.week42.L.sphere.surf.gii

Lines changed: 93 additions & 0 deletions
Large diffs are not rendered by default.

nibabies/data/atlases/dHCP/dHCP.week42.R.sphere.surf.gii

Lines changed: 93 additions & 0 deletions
Large diffs are not rendered by default.

nibabies/data/atlases/mcribs/lh.sphere.reg.dHCP42.surf.gii

Lines changed: 67 additions & 0 deletions
Large diffs are not rendered by default.

nibabies/data/atlases/mcribs/lh.sphere.reg2.surf.gii

Lines changed: 67 additions & 0 deletions
Large diffs are not rendered by default.

nibabies/data/atlases/mcribs/rh.sphere.reg.dHCP42.surf.gii

Lines changed: 67 additions & 0 deletions
Large diffs are not rendered by default.

nibabies/data/atlases/mcribs/rh.sphere.reg2.surf.gii

Lines changed: 67 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)