Roland's homepage

My random knot in the Web

dicom2png

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.

Requirements:

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.

Note

creative commons public domain logo

To the extent possible under law, Roland Smith has waived all copyright and related or neighboring rights to dicom2png.py. This work is published from the Netherlands.


←  git-check-all gitdates  →