@@ -57,10 +57,10 @@ def _precompute(
5757 ]
5858 assert all (os .path .exists (emb_path ) for emb_path in embedding_paths )
5959
60- t_run = time .time () - t_start
61- minutes = int (t_run // 60 )
62- seconds = int (round (t_run % 60 , 0 ))
63- print ("Precomputation took" , t_run , f"seconds (= { minutes :02} :{ seconds :02} minutes)" )
60+ t_run = time .time () - t_start
61+ minutes = int (t_run // 60 )
62+ seconds = int (round (t_run % 60 , 0 ))
63+ print ("Precomputation took" , t_run , f"seconds (= { minutes :02} :{ seconds :02} minutes)" )
6464
6565 return predictor , decoder , embedding_paths
6666
@@ -101,11 +101,11 @@ def _initialize_annotator(
101101 if is_volumetric :
102102 if image .ndim not in [3 , 4 ]:
103103 raise ValueError (f"Invalid image dimensions for 3d annotator, expect 3 or 4 dimensions, got { image .ndim } " )
104- annotator = Annotator3d (viewer )
104+ annotator = Annotator3d (viewer , reset_state = False )
105105 else :
106106 if image .ndim not in (2 , 3 ):
107107 raise ValueError (f"Invalid image dimensions for 2d annotator, expect 2 or 3 dimensions, got { image .ndim } " )
108- annotator = Annotator2d (viewer )
108+ annotator = Annotator2d (viewer , reset_state = False )
109109
110110 if os .path .exists (segmentation_path ):
111111 segmentation_result = imageio .imread (segmentation_path )
0 commit comments