diff --git a/nibabel/brainvoyager/bv_vmr.py b/nibabel/brainvoyager/bv_vmr.py index 6ee244c01e..012469765e 100644 --- a/nibabel/brainvoyager/bv_vmr.py +++ b/nibabel/brainvoyager/bv_vmr.py @@ -17,7 +17,6 @@ from .bv import (BvError, BvFileHeader, BvFileImage, parse_BV_header, pack_BV_header, calc_BV_header_size, combine_st, parse_st) from ..spatialimages import HeaderDataError -from ..batteryrunners import Report import numpy as np diff --git a/nibabel/brainvoyager/bv_vtc.py b/nibabel/brainvoyager/bv_vtc.py index da93a67d1d..d6d0e006d7 100644 --- a/nibabel/brainvoyager/bv_vtc.py +++ b/nibabel/brainvoyager/bv_vtc.py @@ -16,7 +16,6 @@ from __future__ import division from .bv import BvError, BvFileHeader, BvFileImage from ..spatialimages import HeaderDataError -from ..batteryrunners import Report VTC_HDR_DICT_PROTO = ( ('version', 'h', 3), diff --git a/nibabel/brainvoyager/tests/test_bv.py b/nibabel/brainvoyager/tests/test_bv.py index bd651f86ac..d762c76511 100644 --- a/nibabel/brainvoyager/tests/test_bv.py +++ b/nibabel/brainvoyager/tests/test_bv.py @@ -65,47 +65,47 @@ ('another_counter_integer', 0), ('some_unsigned_long_integer', 2712847316), ('some_float', 1.0), - ('some_zero_terminated_string', 'HelloWorld!'), + ('some_zero_terminated_string', b'HelloWorld!'), ('some_conditional_integer', 0), ('another_conditional_integer', 23), ('some_nested_field', [OrderedDict([('a_number', 1), ('a_float', 1.65), - ('a_string', 'test.txt'), + ('a_string', b'test.txt'), ('nested_counter_integer', 2), ('fdr_table_info', [OrderedDict([('another_float', 0.0), - ('another_string', 'sample')]), + ('another_string', b'sample')]), OrderedDict([('another_float', 0.0), - ('another_string', 'sample')])])]), + ('another_string', b'sample')])])]), OrderedDict([('a_number', 1), ('a_float', 1.65), - ('a_string', 'test.txt'), + ('a_string', b'test.txt'), ('nested_counter_integer', 2), ('fdr_table_info', [OrderedDict([('another_float', 0.0), - ('another_string', 'sample')]), + ('another_string', b'sample')]), OrderedDict([('another_float', 0.0), - ('another_string', 'sample')])])]), + ('another_string', b'sample')])])]), OrderedDict([('a_number', 1), ('a_float', 1.65), - ('a_string', 'test.txt'), + ('a_string', b'test.txt'), ('nested_counter_integer', 2), ('fdr_table_info', [OrderedDict([('another_float', 0.0), - ('another_string', 'sample')]), + ('another_string', b'sample')]), OrderedDict([('another_float', 0.0), - ('another_string', 'sample')])])]), + ('another_string', b'sample')])])]), OrderedDict([('a_number', 1), ('a_float', 1.65), - ('a_string', 'test.txt'), + ('a_string', b'test.txt'), ('nested_counter_integer', 2), ('fdr_table_info', [OrderedDict([('another_float', 0.0), - ('another_string', 'sample')]), + ('another_string', b'sample')]), OrderedDict([('another_float', 0.0), ('another_string', - 'sample')])])])]), + b'sample')])])])]), ('another_nested_field', [])]) TEST_HDR_PACKED = \ diff --git a/nibabel/brainvoyager/tests/test_bv_vmp.py b/nibabel/brainvoyager/tests/test_bv_vmp.py index d1675ad44f..0e0555aef3 100644 --- a/nibabel/brainvoyager/tests/test_bv_vmp.py +++ b/nibabel/brainvoyager/tests/test_bv_vmp.py @@ -89,14 +89,14 @@ ('dim_x', 256), ('dim_y', 256), ('dim_z', 256), - ('vtc_filename', 'test.vtc'), - ('prt_filename', ''), - ('voi_filename', ''), + ('vtc_filename', b'test.vtc'), + ('prt_filename', b''), + ('voi_filename', b''), ('maps', [OrderedDict([('type_of_map', 1), ('map_threshold', 1.649999976158142), ('upper_threshold', 8.0), - ('map_name', 'Testmap'), + ('map_name', b'Testmap'), ('pos_min_r', 255), ('pos_min_g', 0), ('pos_min_b', 0), @@ -110,7 +110,7 @@ ('neg_max_g', 0), ('neg_max_b', 255), ('use_vmp_color', 0), - ('lut_filename', ''), + ('lut_filename', b''), ('transparent_color_factor', 1.0), ('nr_of_lags', 0), ('display_min_lag', 0), @@ -148,14 +148,14 @@ ('dim_x', 256), ('dim_y', 256), ('dim_z', 256), - ('vtc_filename', 'test.vtc'), - ('prt_filename', ''), - ('voi_filename', ''), + ('vtc_filename', b'test.vtc'), + ('prt_filename', b''), + ('voi_filename', b''), ('maps', [OrderedDict([('type_of_map', 1), ('map_threshold', 1.649999976158142), ('upper_threshold', 8.0), - ('map_name', 'Testmap'), + ('map_name', b'Testmap'), ('pos_min_r', 255), ('pos_min_g', 0), ('pos_min_b', 0), @@ -169,7 +169,7 @@ ('neg_max_g', 0), ('neg_max_b', 255), ('use_vmp_color', 0), - ('lut_filename', ''), + ('lut_filename', b''), ('transparent_color_factor', 1.0), ('nr_of_lags', 0), ('display_min_lag', 0), @@ -188,7 +188,7 @@ OrderedDict([('type_of_map', 1), ('map_threshold', 1.649999976158142), ('upper_threshold', 8.0), - ('map_name', 'Testmap'), + ('map_name', b'Testmap'), ('pos_min_r', 255), ('pos_min_g', 0), ('pos_min_b', 0), @@ -202,7 +202,7 @@ ('neg_max_g', 0), ('neg_max_b', 255), ('use_vmp_color', 0), - ('lut_filename', ''), + ('lut_filename', b''), ('transparent_color_factor', 1.0), ('nr_of_lags', 0), ('display_min_lag', 0), @@ -242,14 +242,14 @@ ('dim_x', 256), ('dim_y', 256), ('dim_z', 256), - ('vtc_filename', '/path/to/test.vtc'), - ('prt_filename', ''), - ('voi_filename', ''), + ('vtc_filename', b'/path/to/test.vtc'), + ('prt_filename', b''), + ('voi_filename', b''), ('maps', [OrderedDict([('type_of_map', 3), ('map_threshold', 0.16120874881744385), ('upper_threshold', 0.800000011920929), - ('map_name', ''), + ('map_name', b''), ('pos_min_r', 0), ('pos_min_g', 0), ('pos_min_b', 100), @@ -263,7 +263,7 @@ ('neg_max_g', 200), ('neg_max_b', 100), ('use_vmp_color', 0), - ('lut_filename', ''), + ('lut_filename', b''), ('transparent_color_factor', 1.0), ('nr_of_lags', 8), ('display_min_lag', 0), diff --git a/nibabel/brainvoyager/tests/test_bv_vmr.py b/nibabel/brainvoyager/tests/test_bv_vmr.py index 79e05c2bca..865043a024 100644 --- a/nibabel/brainvoyager/tests/test_bv_vmr.py +++ b/nibabel/brainvoyager/tests/test_bv_vmr.py @@ -70,9 +70,9 @@ ('gap_thickness', 0.0), ('nr_of_past_spatial_trans', 2), ('past_spatial_trans', - [OrderedDict([('name', 'NoName'), + [OrderedDict([('name', b'NoName'), ('type', 2), - ('source_file', '/home/test.vmr'), + ('source_file', b'/home/test.vmr'), ('nr_of_trans_val', 16), ('trans_val', [OrderedDict([('value', 1.0)]), @@ -91,9 +91,9 @@ OrderedDict([('value', 0.0)]), OrderedDict([('value', 0.0)]), OrderedDict([('value', 1.0)])])]), - OrderedDict([('name', 'NoName'), + OrderedDict([('name', b'NoName'), ('type', 2), - ('source_file', '/home/test_TRF.vmr'), + ('source_file', b'/home/test_TRF.vmr'), ('nr_of_trans_val', 16), ('trans_val', [OrderedDict([('value', 1.0)]), diff --git a/nibabel/brainvoyager/tests/test_bv_vtc.py b/nibabel/brainvoyager/tests/test_bv_vtc.py index e7b9c87fb0..22368898a0 100644 --- a/nibabel/brainvoyager/tests/test_bv_vtc.py +++ b/nibabel/brainvoyager/tests/test_bv_vtc.py @@ -41,9 +41,9 @@ BVVTC_EXAMPLE_HDRS = [ OrderedDict([('version', 3), - ('fmr', 'test.fmr'), + ('fmr', b'test.fmr'), ('nr_prts', 1), - ('prts', [OrderedDict([('filename', 'test.prt')])]), + ('prts', [OrderedDict([('filename', b'test.prt')])]), ('current_prt', 0), ('datatype', 2), ('volumes', 5),