@@ -81,6 +81,68 @@ def test_define_dataset_auto_tile(tmp_path, caplog):
8181 # Set the default values for dataset definitions
8282 options = set_default_values (project_filename , file_info ["path" ])
8383
84+ # Construct the options for dataset definitions
85+ options = (
86+ options
87+ + "how_to_store_input_images=["
88+ + "Re-save as multiresolution HDF5"
89+ + "] "
90+ + "load_raw_data_virtually "
91+ + "metadata_save_path=["
92+ + result_folder
93+ + "] "
94+ + "image_data_save_path=["
95+ + result_folder
96+ + "] "
97+ + "check_stack_sizes "
98+ + "setups_per_partition=0 "
99+ + "use_deflate_compression "
100+ )
101+
102+ # Construct the final call to ImageJ
103+ final_call = "IJ.run(cmd=[%s], params=[%s])" % (cmd , options )
104+
105+ # Define the dataset using the "Auto-Loader" option
106+ bdv .define_dataset_auto (project_filename , file_info ["path" ], bf_series_type )
107+ # Check if the final call is in the log
108+ assert final_call == caplog .messages [0 ]
109+
110+
111+ def test_define_dataset_auto_tile_split_timepoints (tmp_path , caplog ):
112+ """Test automatic dataset definition method for tile series.
113+
114+ Parameters
115+ ----------
116+ tmp_path : pytest.fixture
117+ Temporary path for the test.
118+ caplog : pytest.fixture
119+ Log capturing fixture.
120+ """
121+
122+ # Set the logging level to capture warnings
123+ caplog .set_level (logging .WARNING )
124+ # Clear the log
125+ caplog .clear ()
126+
127+ # Define the project and file names
128+ project_filename = "proj_name"
129+ file_path = tmp_path
130+ file_info = pathtools .parse_path (file_path )
131+
132+ # Define the result and dataset save paths
133+ result_folder = pathtools .join2 (file_info ["path" ], project_filename )
134+
135+ # Default settings
136+
137+ # Define the type of Bio-Formats series
138+ bf_series_type = "Tiles"
139+
140+ # Define the ImageJ command
141+ cmd = "Define Multi-View Dataset"
142+
143+ # Set the default values for dataset definitions
144+ options = set_default_values (project_filename , file_info ["path" ])
145+
84146 # Construct the options for dataset definitions
85147 options = (
86148 options
@@ -105,7 +167,7 @@ def test_define_dataset_auto_tile(tmp_path, caplog):
105167 final_call = "IJ.run(cmd=[%s], params=[%s])" % (cmd , options )
106168
107169 # Define the dataset using the "Auto-Loader" option
108- bdv .define_dataset_auto (project_filename , file_info ["path" ], bf_series_type )
170+ bdv .define_dataset_auto (project_filename , file_info ["path" ], bf_series_type , timepoints_per_partition = 1 )
109171 # Check if the final call is in the log
110172 assert final_call == caplog .messages [0 ]
111173
@@ -160,8 +222,6 @@ def test_define_dataset_auto_angle(tmp_path, caplog):
160222 + "] "
161223 + "check_stack_sizes "
162224 + "apply_angle_rotation "
163- + "split_hdf5 "
164- + "timepoints_per_partition=1 "
165225 + "setups_per_partition=0 "
166226 + "use_deflate_compression "
167227 )
0 commit comments