@@ -48,7 +48,6 @@ def _hash_file_content(fname):
48
48
49
49
50
50
@freesurfer_test
51
- @needs_nibabel_data ('nitest-freesurfer' )
52
51
def test_geometry ():
53
52
"""Test IO of .surf"""
54
53
surf_path = pjoin (data_path , "surf" , "%s.%s" % ("lh" , "inflated" ))
@@ -114,12 +113,22 @@ def test_geometry():
114
113
np .testing .assert_array_equal (coords_swapped , coords )
115
114
np .testing .assert_array_equal (faces_swapped , faces )
116
115
117
- # Test new quad.
116
+
117
+ @freesurfer_test
118
+ @needs_nibabel_data ('nitest-freesurfer' )
119
+ def test_quad_geometry ():
120
+ """Test IO of freesurfer quad files."""
118
121
new_quad = pjoin (get_nibabel_data (), 'nitest-freesurfer' , 'subjects' ,
119
122
'bert' , 'surf' , 'lh.inflated.nofix' )
120
123
coords , faces = read_geometry (new_quad )
121
124
assert_equal (0 , faces .min ())
122
125
assert_equal (coords .shape [0 ], faces .max () + 1 )
126
+ with InTemporaryDirectory ():
127
+ new_path = 'test'
128
+ write_geometry (new_path , coords , faces )
129
+ coords2 , faces2 = read_geometry (new_path )
130
+ assert_equal (coords , coords2 )
131
+ assert_equal (faces , faces2 )
123
132
124
133
125
134
@freesurfer_test
0 commit comments