Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor-napari-widget' into ref…
Browse files Browse the repository at this point in the history
…actor-napari-widget
  • Loading branch information
IgorTatarnikov committed Feb 2, 2024
2 parents 14a9241 + 186bd47 commit 84d94f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mesospim_stitcher/stitching_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def _on_add_tiles_button_clicked(self):
self.resolution_to_display
)

self.update_tiles_from_mosaic(napari_data)
self.add_tiles_from_mosaic(napari_data)

def _on_stitch_button_clicked(self):
stitch(
Expand Down Expand Up @@ -346,7 +346,7 @@ def check_imagej_path(self):
else:
show_warning("ImageJ path not valid")

def update_tiles_from_mosaic(self, napari_data):
def add_tiles_from_mosaic(self, napari_data):
for data, tile_name in zip(napari_data, self.image_mosaic.tile_names):
tile_data, tile_position = data
tile_layer = self._viewer.add_image(
Expand All @@ -360,6 +360,12 @@ def update_tiles_from_mosaic(self, napari_data):
self.tile_layers.append(tile_layer)
tile_layer.translate = tile_position

def update_tiles_from_mosaic(self, napari_data):
for data, tile_layer in zip(napari_data, self.tile_layers):
tile_data, tile_position = data
tile_layer.data = tile_data
tile_layer.translate = tile_position

# def hideEvent(self, a0, QHideEvent=None):
# super().hideEvent(a0)
# if self.h5_file:
Expand Down

0 comments on commit 84d94f4

Please sign in to comment.