Roland's homepage

My random knot in the Web

dicom2png

Note

It is probably better to use dicom2jpg from the same repository. It produces much smaller files, and the quality is similar.

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:

  • Python 3 (developed and tested with 3.6)
  • ImageMagick

This version requires at least Python 3.6, since it now uses f-strings.


←  git-check-all gitdates  →