From 3d5880db510919625fee722a7fca597c7e7f2960 Mon Sep 17 00:00:00 2001 From: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:22:46 -0500 Subject: [PATCH] ensure the scale is set when __call__ --- micro_sam/sam_annotator/_widgets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/micro_sam/sam_annotator/_widgets.py b/micro_sam/sam_annotator/_widgets.py index 8ec4f85f..63ba5347 100644 --- a/micro_sam/sam_annotator/_widgets.py +++ b/micro_sam/sam_annotator/_widgets.py @@ -1087,6 +1087,9 @@ def __call__(self, skip_validate=False): ndim = image.data.ndim state.image_shape = image.data.shape + # Set layer scale + state.image_scale = tuple(image.scale) + # Process tile_shape and halo, set other data. tile_shape, halo = _process_tiling_inputs(self.tile_x, self.tile_y, self.halo_x, self.halo_y) save_path = None if self.embeddings_save_path == "" else self.embeddings_save_path