Skip to content

Commit 04cd833

Browse files
author
Robert D. Vincent
committed
Test some MINC 1 and MINC 2 edge cases.
1 parent 2e22508 commit 04cd833

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

nibabel/tests/data/minc1-no-att.mnc

6.71 KB
Binary file not shown.

nibabel/tests/data/minc2-no-att.mnc

21.2 KB
Binary file not shown.

nibabel/tests/test_minc1.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,21 @@
8383
max=1.498039216,
8484
mean=0.9090422837),
8585
is_proxy=True),
86+
dict(
87+
fname=pjoin(data_path, 'minc1-no-att.mnc'),
88+
shape=(10, 20, 20),
89+
dtype=np.uint8,
90+
affine=np.array([[0, 0, 1.0, 0],
91+
[0, 1.0, 0, 0],
92+
[1.0, 0, 0, 0],
93+
[0, 0, 0, 1]]),
94+
zooms=(1., 1., 1.),
95+
# These values from SPM2/mincstats
96+
data_summary=dict(
97+
min=0.20784314,
98+
max=0.74901961,
99+
mean=0.6061103),
100+
is_proxy=True),
86101
]
87102

88103

nibabel/tests/test_minc2.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,22 @@
7272
min=0.2078431373,
7373
max=1.498039216,
7474
mean=0.9090422837),
75-
is_proxy=True)
75+
is_proxy=True),
76+
dict(
77+
fname=pjoin(data_path, 'minc2-no-att.mnc'),
78+
shape=(10, 20, 20),
79+
dtype=np.uint8,
80+
affine=np.array([[0, 0, 1.0, 0],
81+
[0, 1.0, 0, 0],
82+
[1.0, 0, 0, 0],
83+
[0, 0, 0, 1]]),
84+
zooms=(1., 1., 1.),
85+
# These values from SPM2/mincstats
86+
data_summary=dict(
87+
min=0.20784314,
88+
max=0.74901961,
89+
mean=0.6061103),
90+
is_proxy=True),
7691
]
7792

7893
if have_h5py:

0 commit comments

Comments
 (0)