Skip to content

Commit 98a753c

Browse files
committed
Add cifti attribute.
1 parent 1dc7ad0 commit 98a753c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

niworkflows/utils/spaces.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ class Reference:
148148
"""The dictionary of specs."""
149149
standard = attr.ib(default=False, repr=False, type=bool)
150150
"""Whether this space is standard or not."""
151+
cifti = attr.ib(default=False, repr=False, type=bool)
152+
"""Whether this space is a CIFTI space or not."""
151153
dim = attr.ib(default=3, repr=False, type=int)
152154
"""Dimensionality of the sampling manifold."""
153155

@@ -165,6 +167,7 @@ def __attrs_post_init__(self):
165167
spec["den"] = FSAVERAGE_DENSITY[space]
166168
object.__setattr__(self, "spec", spec)
167169

170+
# XXX: This won't cover dhcpAsym, dhcpSym, or onavg
168171
if self.space.startswith("fs"):
169172
object.__setattr__(self, "dim", 2)
170173

@@ -186,6 +189,9 @@ def __attrs_post_init__(self):
186189
if self.space in self._standard_spaces:
187190
object.__setattr__(self, "standard", True)
188191

192+
if "volspace" in self.spec:
193+
object.__setattr__(self, "cifti", True)
194+
189195
# Check that cohort is handled appropriately
190196
_cohorts = ["%s" % t for t in _tfapi.TF_LAYOUT.get_cohorts(template=self.space)]
191197
if "cohort" in self.spec:

0 commit comments

Comments
 (0)