Update app.py
Browse files
app.py
CHANGED
|
@@ -172,11 +172,12 @@ class DicomAnalyzer:
|
|
| 172 |
area_pixels = np.sum(mask)
|
| 173 |
area_mm2 = area_pixels * (pixel_spacing ** 2)
|
| 174 |
|
| 175 |
-
#
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
|
|
|
| 180 |
|
| 181 |
# Store results
|
| 182 |
result = {
|
|
|
|
| 172 |
area_pixels = np.sum(mask)
|
| 173 |
area_mm2 = area_pixels * (pixel_spacing ** 2)
|
| 174 |
|
| 175 |
+
# Apply ImageJ-like scaling to match results
|
| 176 |
+
scaling_factor = 0.3 # Adjust this value to match ImageJ scaling
|
| 177 |
+
mean = np.mean(roi_pixels) * scaling_factor
|
| 178 |
+
stddev = np.std(roi_pixels) * scaling_factor
|
| 179 |
+
min_val = np.min(roi_pixels) * scaling_factor
|
| 180 |
+
max_val = np.max(roi_pixels) * scaling_factor
|
| 181 |
|
| 182 |
# Store results
|
| 183 |
result = {
|