Update app.py
Browse files
app.py
CHANGED
@@ -161,7 +161,7 @@ def read_and_preprocess_dicom(file_path: str):
|
|
161 |
np.uint8)
|
162 |
image_pil = Image.fromarray(pixel_array)
|
163 |
#convert to cv2 format
|
164 |
-
image = np.array(image_pil)[:,
|
165 |
|
166 |
# Collect metadata in dictionary format and convert to DataFrame
|
167 |
metadata_dict = {elem.name: str(elem.value) for elem in dicom_data.iterall() if elem.name != 'Pixel Data'}
|
|
|
161 |
np.uint8)
|
162 |
image_pil = Image.fromarray(pixel_array)
|
163 |
#convert to cv2 format
|
164 |
+
image = np.array(image_pil)[:, ::-1].copy()
|
165 |
|
166 |
# Collect metadata in dictionary format and convert to DataFrame
|
167 |
metadata_dict = {elem.name: str(elem.value) for elem in dicom_data.iterall() if elem.name != 'Pixel Data'}
|