HeshamAI commited on
Commit
147412d
·
verified ·
1 Parent(s): f0101ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -134,13 +134,9 @@ class DicomAnalyzer:
134
  clicked_x = evt.index[0]
135
  clicked_y = evt.index[1]
136
 
137
- # Convert coordinates for zoomed image
138
- if self.zoom_factor != 1.0:
139
- x = int((clicked_x + self.pan_x) / self.zoom_factor)
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