@@ -31,6 +31,7 @@ def setup_module():
3131 # standard.tck contains only streamlines
3232 DATA ['standard_tck_fname' ] = pjoin (data_path , 'standard.tck' )
3333 DATA ['matlab_nan_tck_fname' ] = pjoin (data_path , 'matlab_nan.tck' )
34+ DATA ['multiline_header_fname' ] = pjoin (data_path , 'multiline_header_field.tck' )
3435
3536 DATA ['streamlines' ] = [
3637 np .arange (1 * 3 , dtype = 'f4' ).reshape ((1 , 3 )),
@@ -87,6 +88,14 @@ def test_load_matlab_nan_file(self):
8788 assert len (streamlines ) == 1
8889 assert streamlines [0 ].shape == (108 , 3 )
8990
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+
9099 def test_writeable_data (self ):
91100 data = DATA ['simple_tractogram' ]
92101 for key in ('simple_tck_fname' , 'simple_tck_big_endian_fname' ):
0 commit comments