fastdup icon indicating copy to clipboard operation
fastdup copied to clipboard

[Feature Request]: Support DICOM image

Open dnth opened this issue 10 months ago • 0 comments

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()

image

Data from Kaggle RSNA challenge.

Contact Information [Optional]

No response

dnth avatar Aug 29 '23 07:08 dnth