@@ -51,10 +51,12 @@ def run_prediction(tomogram, deposition_id, processing_type):
5151 write_ome_zarr (output_file , segmentation , voxel_size )
5252
5353
54+ # TODO download on lower scale
5455def check_result (tomogram , deposition_id , processing_type ):
5556 import napari
5657
5758 # Read tomogram data on the fly.
59+ print ("Download data ..." )
5860 data , voxel_size = read_data_from_cryo_et_portal_run (
5961 tomogram .run_id , processing_type = processing_type
6062 )
@@ -63,7 +65,8 @@ def check_result(tomogram, deposition_id, processing_type):
6365 output_folder = os .path .join (f"upload_CZCDP-{ deposition_id } " , str (tomogram .run .dataset_id ))
6466 output_file = os .path .join (output_folder , f"{ tomogram .run .name } .zarr" )
6567 if os .path .exists (output_file ):
66- segmentation = None # TODO load the segmentation from zarr
68+ with zarr .open (output_file , "r" ) as f :
69+ segmentation = f ["0" ][:]
6770 else :
6871 segmentation = None
6972
@@ -95,5 +98,6 @@ def main():
9598 run_prediction (tomogram , deposition_id , processing_type )
9699
97100
101+ # TODO segmented at wrong size, check voxel size!
98102if __name__ == "__main__" :
99103 main ()
0 commit comments