We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26970f2 commit 4e20ab4Copy full SHA for 4e20ab4
nitransforms/tests/test_base.py
@@ -0,0 +1,18 @@
1
+"""Tests of the base module"""
2
+import numpy as np
3
+
4
+from ..base import ImageSpace
5
6
7
+def test_ImageSpace(get_data):
8
+ im = get_data['RAS']
9
10
+ img = ImageSpace(im)
11
+ assert img.affine == np.linalg.inv(img.inverse)
12
13
+ # nd index / coords
14
+ idxs = img.ndindex
15
+ coords = img.ndcoords
16
+ assert len(idxs.shape) == len(coords.shape) == 2
17
+ assert idxs.shape[0] == coords.shape[0] == img.ndim == 3
18
+ assert idxs.shape[1] == coords.shape[1] == img.nvox == np.prod(im.shape)
0 commit comments