This simple python script uses ImageMagick to convert DICOM images from a Philips digital X-ray machine to PNG format. It crops the images from 2048x2048 pixels to 1574x2048 pixels, the actual size of the detector.
To speed up the processing of multiple pictures, this script runs the conversions in parallel on all the cores that your machine has.
You can download it from github.
This version was ported to Python 3. It can be run under Python 2 with minor modifications;
- Change the #!-line to point to your Python 2 executable.
- Add from __future__ import division, print_function as the first statement.