Update app.py
Browse files
app.py
CHANGED
@@ -167,9 +167,9 @@ def read_and_preprocess_dicom(file_path: str):
|
|
167 |
# PIL images into NumPy arrays
|
168 |
numpydata = asarray(image_pil)
|
169 |
#convert to cv2 format
|
170 |
-
|
171 |
-
print("In preprocess dicom:",
|
172 |
-
image = np.array(
|
173 |
|
174 |
)
|
175 |
|
|
|
167 |
# PIL images into NumPy arrays
|
168 |
numpydata = asarray(image_pil)
|
169 |
#convert to cv2 format
|
170 |
+
numpydata = image_pil.reshape((numpydata.shape[0], numpydata.shape[1], 1))
|
171 |
+
print("In preprocess dicom:", numpydata.shape)
|
172 |
+
image = np.array(numpydata)[::-1].copy()
|
173 |
|
174 |
)
|
175 |
|