MingGatsby
commited on
Commit
•
7821fcb
1
Parent(s):
fd99db1
Update Util/DICOM.py
Browse files- Util/DICOM.py +0 -18
Util/DICOM.py
CHANGED
@@ -27,24 +27,6 @@ class DICOM_Utils(object):
|
|
27 |
|
28 |
return windowed_image.astype('uint8')
|
29 |
|
30 |
-
def transform_image_for_display(image_array):
|
31 |
-
"""
|
32 |
-
Transform the image for display: Flip horizontally and then rotate 90 degrees to the right.
|
33 |
-
|
34 |
-
Parameters:
|
35 |
-
- image_array: numpy array of the image
|
36 |
-
|
37 |
-
Returns:
|
38 |
-
- Transformed image array
|
39 |
-
"""
|
40 |
-
# Flip horizontally
|
41 |
-
flipped_image = np.fliplr(image_array)
|
42 |
-
|
43 |
-
# Rotate 90 degrees to the right
|
44 |
-
rotated_image = np.rot90(flipped_image, 1)
|
45 |
-
|
46 |
-
return rotated_image
|
47 |
-
|
48 |
def apply_CAM_overlay(heatmap, windowed_image, overlay_alpha=0.4):
|
49 |
"""
|
50 |
Apply CAM (Class Activation Map) overlay to a given image.
|
|
|
27 |
|
28 |
return windowed_image.astype('uint8')
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
def apply_CAM_overlay(heatmap, windowed_image, overlay_alpha=0.4):
|
31 |
"""
|
32 |
Apply CAM (Class Activation Map) overlay to a given image.
|