Skip to content

Commit 8ac1698

Browse files
committed
TEST: add very basic segmentation test run
brain_segmentation had no tests.
1 parent 5c5fc1a commit 8ac1698

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
""" Testing brain segmentation module
2+
"""
3+
4+
import numpy as np
5+
6+
from numpy.testing import (assert_almost_equal,
7+
assert_array_equal)
8+
9+
from nose.tools import (assert_true, assert_false, assert_raises,
10+
assert_equal, assert_not_equal)
11+
12+
from ..brain_segmentation import brain_segmentation
13+
14+
15+
from ....io.files import load as load_image
16+
from ....testing import anatfile
17+
18+
19+
def test_bseg():
20+
# Very crude smoke test
21+
anat_img = load_image(anatfile)
22+
ppm_img, label_img = brain_segmentation(anat_img)
23+
assert_equal(ppm_img.ndim, 4)
24+
assert_equal(label_img.ndim, 3)

0 commit comments

Comments
 (0)