`你好, 我有一个用于乳腺癌乳房 X 线照片的 dicom 图像,当使用 RadiAnt 查看它时,它显示出完整的质量,但是当我尝试使用 pydicom 库来显示图像时,质量不如在 RadiAnt 中。 这是我尝试运行的代码
import pydicom
import matplotlib.pyplot as plt
# Load the DICOM file
dcm_file = pydicom.dcmread(r"C:\Users\gouda\Desktop\Syn20230321170649\00000006")
# Extract the image data from the DICOM file
image = dcm_file.pixel_array
fig = plt.figure(figsize=(8, 8))
# Plot the image using matplotlib
plt.imshow(image, cmap='gray')
plt.axis('off')
plt.title('DICOM Image')
plt.show()