Update app.py
Browse files
app.py
CHANGED
@@ -170,14 +170,13 @@ def read_and_preprocess_dicom(file_path: str):
|
|
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 |
|
176 |
-
# <class 'numpy.ndarray'>
|
177 |
-
print(type(numpydata))
|
178 |
|
179 |
-
# shape
|
180 |
-
print(numpydata.shape)
|
|
|
181 |
# Collect metadata in dictionary format and convert to DataFrame
|
182 |
metadata_dict = {elem.name: str(elem.value) for elem in dicom_data.iterall() if elem.name != 'Pixel Data'}
|
183 |
df_metadata = pl.DataFrame({
|
|
|
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 |
+
# <class 'numpy.ndarray'>
|
175 |
+
print(type(numpydata))
|
176 |
|
177 |
+
# shape
|
178 |
+
print("numpydata.shape:",numpydata.shape)
|
179 |
+
|
180 |
# Collect metadata in dictionary format and convert to DataFrame
|
181 |
metadata_dict = {elem.name: str(elem.value) for elem in dicom_data.iterall() if elem.name != 'Pixel Data'}
|
182 |
df_metadata = pl.DataFrame({
|