classification
Title: Support for DICOM image file format in imghdr module
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: claw, terry.reedy, trrhodes
Priority: normal Keywords: patch

Created on 2021-01-13 00:28 by claw, last changed 2021-01-16 13:27 by trrhodes.

Pull Requests
URL Status Linked Edit
PR 24227 open trrhodes, 2021-01-16 12:42
Messages (3)
msg384989 - (view) Author: Charles Law (claw) * Date: 2021-01-13 00:28
DICOM is a file format used frequently in medical imaging (it is also a communications protocol). It has been used since the 80's, and is still widely used by modern medical equipment.

It has a well defined format: http://dicom.nema.org/dicom/2013/output/chtml/part10/chapter_7.html

This proposal is for the addiction of a check to imghdr module to detect DICOM files, with imghdr.what() and return 'dicom' if a dicom file is found.
msg385131 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-16 00:46
Can you submit a patch, or post here an test_dicom function?
msg385139 - (view) Author: Ross Rhodes (trrhodes) * Date: 2021-01-16 13:27
Hello Charles,

Following the format provided, I've opened a PR to implement your proposal. Feedback welcome.
History
Date User Action Args
2021-01-16 13:27:33trrhodessetmessages: + msg385139
2021-01-16 12:42:35trrhodessetkeywords: + patch
nosy: + trrhodes

pull_requests: + pull_request23050
stage: needs patch -> patch review
2021-01-16 00:46:51terry.reedysetnosy: + terry.reedy

messages: + msg385131
stage: needs patch
2021-01-13 00:28:46clawcreate