wangjin2000 commited on
Commit
7ed8e12
·
verified ·
1 Parent(s): 7d6a431

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -107,8 +107,10 @@ def read_and_preprocess_dicom(file_path: str):
107
 
108
  # Normalize the pixel data to 8-bit and convert to a PIL image
109
  if pixel_array.dtype != np.uint8:
 
110
  pixel_array = ((pixel_array - np.min(pixel_array)) / (np.max(pixel_array) - np.min(pixel_array)) * 255).astype(
111
  np.uint8)
 
112
  image_pil = Image.fromarray(pixel_array)
113
 
114
  image = image_pil.convert('RGB')
 
107
 
108
  # Normalize the pixel data to 8-bit and convert to a PIL image
109
  if pixel_array.dtype != np.uint8:
110
+ print("np.min(pixel_array,np.max(pixel_array:",np.min(pixel_array,np.max(pixel_array)
111
  pixel_array = ((pixel_array - np.min(pixel_array)) / (np.max(pixel_array) - np.min(pixel_array)) * 255).astype(
112
  np.uint8)
113
+ print("Normalized np.min(pixel_array,np.max(pixel_array:",np.min(pixel_array,np.max(pixel_array)
114
  image_pil = Image.fromarray(pixel_array)
115
 
116
  image = image_pil.convert('RGB')