@@ -31,6 +31,7 @@ def setup_module():
31
31
# standard.tck contains only streamlines
32
32
DATA ['standard_tck_fname' ] = pjoin (data_path , 'standard.tck' )
33
33
DATA ['matlab_nan_tck_fname' ] = pjoin (data_path , 'matlab_nan.tck' )
34
+ DATA ['multiline_header_fname' ] = pjoin (data_path , 'multiline_header_field.tck' )
34
35
35
36
DATA ['streamlines' ] = [
36
37
np .arange (1 * 3 , dtype = 'f4' ).reshape ((1 , 3 )),
@@ -87,6 +88,14 @@ def test_load_matlab_nan_file(self):
87
88
assert len (streamlines ) == 1
88
89
assert streamlines [0 ].shape == (108 , 3 )
89
90
91
+ def test_load_multiline_header_file (self ):
92
+ for lazy_load in [False , True ]:
93
+ tck = TckFile .load (DATA ['multiline_header_fname' ], lazy_load = lazy_load )
94
+ streamlines = list (tck .tractogram .streamlines )
95
+ assert len (tck .header ['command_history' ].splitlines ()) == 3
96
+ assert len (streamlines ) == 1
97
+ assert streamlines [0 ].shape == (253 , 3 )
98
+
90
99
def test_writeable_data (self ):
91
100
data = DATA ['simple_tractogram' ]
92
101
for key in ('simple_tck_fname' , 'simple_tck_big_endian_fname' ):
0 commit comments