@@ -32,6 +32,7 @@ def setup():
32
32
"simple_big_endian.tck" )
33
33
# standard.tck contains only streamlines
34
34
DATA ['standard_tck_fname' ] = pjoin (data_path , "standard.tck" )
35
+ DATA ['matlab_nan_tck_fname' ] = pjoin (data_path , "matlab_nan.tck" )
35
36
36
37
DATA ['streamlines' ] = [np .arange (1 * 3 , dtype = "f4" ).reshape ((1 , 3 )),
37
38
np .arange (2 * 3 , dtype = "f4" ).reshape ((2 , 3 )),
@@ -64,6 +65,13 @@ def test_load_simple_file(self):
64
65
tck = TckFile (tractogram , header = hdr )
65
66
assert_tractogram_equal (tck .tractogram , DATA ['simple_tractogram' ])
66
67
68
+ def test_load_matlab_nan_file (self ):
69
+ for lazy_load in [False , True ]:
70
+ tck = TckFile .load (DATA ['matlab_nan_tck_fname' ], lazy_load = lazy_load )
71
+ streamlines = list (tck .tractogram .streamlines )
72
+ assert_equal (len (streamlines ), 1 )
73
+ assert_equal (streamlines [0 ].shape , (108 , 3 ))
74
+
67
75
def test_writeable_data (self ):
68
76
data = DATA ['simple_tractogram' ]
69
77
for key in ('simple_tck_fname' , 'simple_tck_big_endian_fname' ):
0 commit comments