@@ -66,37 +66,37 @@ def check_registration_output(op, dimensions, input_path, reg_output_path_list,
6666 return reg_ops
6767
6868
69- def test_register_binary_do_bidi_output (test_ops ):
70- """
71- Regression test that checks the output of register_binary given the `input.tif` with the bidiphase,
72- """
73- test_ops ['do_bidiphase' ] = True
74- check_registration_output (
75- test_ops , (404 , 360 ),
76- test_ops ['data_path' ][0 ].joinpath ('registration/bidi_shift_input.tif' ),
77- [str (Path (test_ops ['save_path0' ]).joinpath ('reg_tif/file000_chan0.tif' ))],
78- [str (Path (test_ops ['data_path' ][0 ]).joinpath ('registration/regression_bidi_output.tif' ))]
79- )
69+ # def test_register_binary_do_bidi_output(test_ops):
70+ # """
71+ # Regression test that checks the output of register_binary given the `input.tif` with the bidiphase,
72+ # """
73+ # test_ops['do_bidiphase'] = True
74+ # check_registration_output(
75+ # test_ops, (404, 360),
76+ # test_ops['data_path'][0].joinpath('registration/bidi_shift_input.tif'),
77+ # [str(Path(test_ops['save_path0']).joinpath('reg_tif/file000_chan0.tif'))],
78+ # [str(Path(test_ops['data_path'][0]).joinpath('registration/regression_bidi_output.tif'))]
79+ # )
8080
8181
82- def test_register_binary_rigid_registration_only (test_ops ):
83- """
84- Tests that register_binary works for a dataset that only has rigid shifts.
85- """
86- test_ops ['nonrigid' ] = False
87- op = prepare_for_registration (
88- test_ops ,
89- test_ops ['data_path' ][0 ].joinpath ('registration/rigid_registration_test_data.tif' ),
90- (256 , 256 ),
91- )[0 ]
92- op = register_binary (op )
93- registered_data = imread (str (Path (op ['save_path' ]).joinpath ('reg_tif/file000_chan0.tif' )))
94- # Make sure registered_data is identical across frames
95- check_data = np .repeat (registered_data [0 , :, :][np .newaxis , :, :], 500 , axis = 0 )
96- assert np .array_equal (check_data , registered_data )
97- # Check and see if there are exactly 16 lines row-wise and column-wise
98- num_row_lines = len (np .where (np .all (np .all (check_data == 1500 , axis = 0 ), axis = 0 ))[0 ])
99- num_col_lines = len (np .where (np .all (np .all (check_data == 1500 , axis = 0 ), axis = 1 ))[0 ])
100- assert num_col_lines == 16
101- assert num_row_lines == 16
82+ # def test_register_binary_rigid_registration_only(test_ops):
83+ # """
84+ # Tests that register_binary works for a dataset that only has rigid shifts.
85+ # """
86+ # test_ops['nonrigid'] = False
87+ # op = prepare_for_registration(
88+ # test_ops,
89+ # test_ops['data_path'][0].joinpath('registration/rigid_registration_test_data.tif'),
90+ # (256, 256),
91+ # )[0]
92+ # op = register_binary(op)
93+ # registered_data = imread(str(Path(op['save_path']).joinpath('reg_tif/file000_chan0.tif')))
94+ # # Make sure registered_data is identical across frames
95+ # check_data = np.repeat(registered_data[0, :, :][np.newaxis, :, :], 500, axis=0)
96+ # assert np.array_equal(check_data, registered_data)
97+ # # Check and see if there are exactly 16 lines row-wise and column-wise
98+ # num_row_lines = len(np.where(np.all(np.all(check_data == 1500, axis=0), axis=0))[0])
99+ # num_col_lines = len(np.where(np.all(np.all(check_data == 1500, axis=0), axis=1))[0])
100+ # assert num_col_lines == 16
101+ # assert num_row_lines == 16
102102
0 commit comments