DICOMDIR is a file which is used when medical images are saved on CD-R, DVD-R, USB flash drives or other external storage devices.
DICOMDIR records patients and examinations information, and others, as tags of nested structure.
The name of the DICOMDIR file is DICOMDIR, without any extension.
DICOMDIR is part of DICOM Digital Imaging and Communications in Medicine, a standard (ISO 12052) for storing and transmitting medical images.
DICOM is managed by the Medical Imaging & Technology Alliance (MITA), a division of the american National Electrical Manufacturers Association (NEMA), now called the Association of Electrical Equipment and Medical Imaging Manufacturers.
The present apps dump the content of a DICOMDIR file in a browser web page. Public demos are available at my website :
- load a DICOMDIR file from a remote server : loadDICOMDIR.html
- read a DICOMDIR file from a local folder : readDICOMDIR.html
The loadDICOMDIR app uses a XMLHttpRequest to download the remote file. For security reasons, browsers restrict such downloads if the requested source is hosted in another domain. This demo server, hosted on Amazon Web Services (AWS), uses the Cross Origin Resource Sharing (CORS) protocol to allow cross-origin requests.
The dicomParser library of the outstanding open-source cornerstone framework, developed by Chris Hafey, is used to parse the DICOMDIR file. The related javascript file dicomParser.min.js is not included in this project, please download it from the cornerstone GitHub.
The present repository is related to the medical project RadioLogic.
The demos and the related documentation have been created for my own needs.
The files have been validated with the W3C Markup Validation Service and with JSHint, a Javascript Code Quality Tool.
The code has been tested with the following browsers :
- Safari 10
- Safari iOS 10.3.1
- Firefox 54
- Chrome 60
- IE 11
- Edge 38
- Android 6.0
I think the code may be of interest to other developers. If you find it useful, you are welcome.