From 11bda2ccfecfca643701cb7c7f0ecc98e2b39dc7 Mon Sep 17 00:00:00 2001 From: Raul G <51966905+rmgonzal@users.noreply.github.com> Date: Wed, 24 Mar 2021 12:46:37 +0100 Subject: [PATCH 1/2] Update poimangui.py https://github.com/Ulm-IQO/qudi/issues/512#issue-440787920 This bug is affected because POI on the confocal image only saves the x, y position into the roi_origin, and since, by default, the values are set to zero. Since the z position is not saved into the POI file (which should be a fixed value) and take it from ROI origin. So simply adding new_pos[2] = self.poimanagerlogic().scanner_position[2] line 629 "gui/poimanger/poimangui.py" will fix this bug. --- gui/poimanager/poimangui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/poimanager/poimangui.py b/gui/poimanager/poimangui.py index cdb27e06b3..aebaeb36d7 100644 --- a/gui/poimanager/poimangui.py +++ b/gui/poimanager/poimangui.py @@ -626,6 +626,8 @@ def create_poi_from_click(self, button, pos): new_pos = self.poimanagerlogic().roi_origin new_pos[0] = pos.x() new_pos[1] = pos.y() + new_pos[2] = self.poimanagerlogic().scanner_position[2] #Added by rmgonzal + self.sigAddPoiByClick.emit(new_pos) return From c5f3f9455d382488c2f069a65befd259faae65fb Mon Sep 17 00:00:00 2001 From: Raul G <51966905+rmgonzal@users.noreply.github.com> Date: Mon, 29 Mar 2021 14:36:00 +0200 Subject: [PATCH 2/2] Update poimangui.py --- gui/poimanager/poimangui.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gui/poimanager/poimangui.py b/gui/poimanager/poimangui.py index aebaeb36d7..3ee8f352fa 100644 --- a/gui/poimanager/poimangui.py +++ b/gui/poimanager/poimangui.py @@ -622,12 +622,8 @@ def create_poi_from_click(self, button, pos): # In our case this is most likely the POI marker to select the active POI from. if button != QtCore.Qt.LeftButton: return - # Z position from ROI origin, X and Y positions from click event - new_pos = self.poimanagerlogic().roi_origin - new_pos[0] = pos.x() - new_pos[1] = pos.y() - new_pos[2] = self.poimanagerlogic().scanner_position[2] #Added by rmgonzal - + # Z position from scanner, X and Y positions from click event + new_pos = np.array([pos.x(), pos.y(), self.poimanagerlogic().scanner_position[2]]) self.sigAddPoiByClick.emit(new_pos) return