wangjin2000
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -171,10 +171,10 @@ def read_and_preprocess_dicom(file_path: str):
|
|
171 |
|
172 |
print("In preprocess dicom:", image.size)
|
173 |
#image = np.array(numpydata)[::-1].copy()
|
174 |
-
|
175 |
|
176 |
# shape
|
177 |
-
|
178 |
|
179 |
# Collect metadata in dictionary format and convert to DataFrame
|
180 |
metadata_dict = {elem.name: str(elem.value) for elem in dicom_data.iterall() if elem.name != 'Pixel Data'}
|
|
|
171 |
|
172 |
print("In preprocess dicom:", image.size)
|
173 |
#image = np.array(numpydata)[::-1].copy()
|
174 |
+
image = np.array(image)[:,:,::-1].copy()
|
175 |
|
176 |
# shape
|
177 |
+
print("In preprocess dicom-image.shape2:",image.shape)
|
178 |
|
179 |
# Collect metadata in dictionary format and convert to DataFrame
|
180 |
metadata_dict = {elem.name: str(elem.value) for elem in dicom_data.iterall() if elem.name != 'Pixel Data'}
|