From 245f3b456bcd0f90e9b863b52f0a1f28afbc3334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20M=C3=BCller?= Date: Fri, 10 Jun 2022 10:40:08 +0200 Subject: [PATCH] fix: initial wrong scaling in colocalize --- CHANGELOG | 2 ++ impose/gui/collect.py | 1 + impose/gui/colocalize.py | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ff455e9..db545d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,8 @@ - feat: implement saving and loading of structure composites (#1) - fix: visualization issue with empty data (#47) - fix: editing layers not possible (regression from migration to PyQt6) + - fix: initial wrong scaling in colocalize when input data has different + pixel sizes along the dimensions 0.2.4 - fix: properly handle FileNotFounderror (#44) - fix: properly handle bmlab exceptions (#42) diff --git a/impose/gui/collect.py b/impose/gui/collect.py index 12ba03a..3fbbd6c 100644 --- a/impose/gui/collect.py +++ b/impose/gui/collect.py @@ -164,6 +164,7 @@ def on_image_changed(self, image): self.groupBox_struct.setEnabled(False) else: self.groupBox_struct.setEnabled(True) + self.update_ui_from_scheme() @QtCore.pyqtSlot() def on_layer_color_changed(self): diff --git a/impose/gui/colocalize.py b/impose/gui/colocalize.py index 4a0773b..355811e 100644 --- a/impose/gui/colocalize.py +++ b/impose/gui/colocalize.py @@ -351,5 +351,9 @@ def update_ui_from_scheme(self): self.update_structure_table() # set new ROIs self.vis.set_data_source(self.current_data_source) + # Scale the current shape according to the scale in the current + # data source. + self.current_structure_composite.set_scale( + point_um=self.current_point_um) self.rois.set_structure_composite(self.current_structure_composite, self.vis)