Update app.py
Browse files
app.py
CHANGED
|
@@ -134,13 +134,9 @@ class DicomAnalyzer:
|
|
| 134 |
clicked_x = evt.index[0]
|
| 135 |
clicked_y = evt.index[1]
|
| 136 |
|
| 137 |
-
#
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
y = int((clicked_y + self.pan_y) / self.zoom_factor)
|
| 141 |
-
else:
|
| 142 |
-
x = clicked_x
|
| 143 |
-
y = clicked_y
|
| 144 |
|
| 145 |
# Apply ImageJ coordinate system correction (start from 1 instead of 0)
|
| 146 |
x += 1
|
|
|
|
| 134 |
clicked_x = evt.index[0]
|
| 135 |
clicked_y = evt.index[1]
|
| 136 |
|
| 137 |
+
# Correct coordinates for zoom and pan
|
| 138 |
+
x = int((clicked_x + self.pan_x) / self.zoom_factor)
|
| 139 |
+
y = int((clicked_y + self.pan_y) / self.zoom_factor)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
# Apply ImageJ coordinate system correction (start from 1 instead of 0)
|
| 142 |
x += 1
|