Skip to content

Commit ba8a440

Browse files
committed
ENH: Add stubs from BIAP 9
1 parent 13d0351 commit ba8a440

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

nibabel/coordimage.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
class CoordinateImage:
2+
"""
3+
Attributes
4+
----------
5+
header : a file-specific header
6+
coordaxis : ``CoordinateAxis``
7+
dataobj : array-like
8+
"""
9+
10+
11+
class CoordinateAxis:
12+
"""
13+
Attributes
14+
----------
15+
parcels : list of ``Parcel`` objects
16+
"""
17+
18+
def load_structures(self, mapping):
19+
"""
20+
Associate parcels to ``Pointset`` structures
21+
"""
22+
raise NotImplementedError
23+
24+
def __getitem__(self, slicer):
25+
"""
26+
Return a sub-sampled CoordinateAxis containing structures
27+
matching the indices provided.
28+
"""
29+
raise NotImplementedError
30+
31+
def get_indices(self, parcel, indices=None):
32+
"""
33+
Return the indices in the full axis that correspond to the
34+
requested parcel. If indices are provided, further subsample
35+
the requested parcel.
36+
"""
37+
raise NotImplementedError
38+
39+
40+
class Parcel:
41+
"""
42+
Attributes
43+
----------
44+
name : str
45+
structure : ``Pointset``
46+
indices : object that selects a subset of coordinates in structure
47+
"""
48+
49+
50+
class GeometryCollection:
51+
"""
52+
Attributes
53+
----------
54+
structures : dict
55+
Mapping from structure names to ``Pointset``
56+
"""
57+
58+
@classmethod
59+
def from_spec(klass, pathlike):
60+
"""Load a collection of geometries from a specification."""
61+
raise NotImplementedError

0 commit comments

Comments
 (0)