Skip to content

Commit 5b93bcc

Browse files
Julien Marabottooesteban
authored andcommitted
enh: update implementation of X5
(cherry picked from commit 3d263bb)
1 parent 9883468 commit 5b93bcc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

nitransforms/io/x5.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,19 @@ def from_filename(cls, filename):
5151
if str(filename).endswith(".h5"):
5252
with H5File(str(filename)) as f:
5353
return cls.from_h5obj(f)
54+
55+
class X5LinearTransformArray(BaseLinearTransformList):
56+
"""A string-based structure for series of X5 linear transforms."""
57+
58+
_inner_type = X5LinearTransform
59+
60+
@property
61+
def xforms(self):
62+
"""Get the list of internal ITKLinearTransforms."""
63+
return self._xforms
64+
65+
@xforms.setter
66+
def xforms(self, value):
67+
self._xforms = list(value)
68+
for i, val in enumerate(self.xforms):
69+
val["index"] = i

0 commit comments

Comments
 (0)