fastdup
fastdup copied to clipboard
[Feature Request]: Support DICOM image
Feature Name
Native DICOM image support
Feature Description
Images in medical datasets are usually stored in .dcm format which includes other metadata.
To get pixel values from .dcm image, first install the libraries:
pip install pydicom pylibjpeg
Here's a code snippet to get the pixel values from a .dcm
image.
import pydicom
dicom_file_path = "1000.dcm"
dicom_image = pydicom.dcmread(dicom_file_path)
pixel_data = dicom_image.pixel_array
import matplotlib.pyplot as plt
plt.imshow(pixel_data, cmap=plt.cm.gray)
plt.show()
Data from Kaggle RSNA challenge.
Contact Information [Optional]
No response