|
16 | 16 | from .. import (read_geometry, read_morph_data, read_annot, read_label, |
17 | 17 | write_geometry, write_morph_data, write_annot) |
18 | 18 |
|
19 | | -from ...tests.nibabel_data import get_nibabel_data |
| 19 | +from ...tests.nibabel_data import get_nibabel_data, needs_nibabel_data |
20 | 20 | from ...fileslice import strided_scalar |
21 | 21 | from ...testing import clear_and_catch_warnings |
22 | 22 |
|
@@ -48,6 +48,7 @@ def _hash_file_content(fname): |
48 | 48 |
|
49 | 49 |
|
50 | 50 | @freesurfer_test |
| 51 | +@needs_nibabel_data('nitest-freesurfer') |
51 | 52 | def test_geometry(): |
52 | 53 | """Test IO of .surf""" |
53 | 54 | surf_path = pjoin(data_path, "surf", "%s.%s" % ("lh", "inflated")) |
@@ -113,6 +114,13 @@ def test_geometry(): |
113 | 114 | np.testing.assert_array_equal(coords_swapped, coords) |
114 | 115 | np.testing.assert_array_equal(faces_swapped, faces) |
115 | 116 |
|
| 117 | + # Test new quad. |
| 118 | + new_quad = pjoin(get_nibabel_data(), 'nitest-freesurfer', 'subjects', |
| 119 | + 'bert', 'surf', 'lh.inflated.nofix') |
| 120 | + coords, faces, volume_info = read_geometry(new_quad) |
| 121 | + assert_equal(0, faces.min()) |
| 122 | + assert_equal(coords.shape[0], faces.max() + 1) |
| 123 | + |
116 | 124 |
|
117 | 125 | @freesurfer_test |
118 | 126 | def test_morph_data(): |
|
0 commit comments