Roland's homepage

My random knot in the Web

dicom2png

Update: The checkfor function was split off into its own
(included) module.

This simple 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.

source:dicom2png.zip
GPG signature:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEABECAAYFAlDV7/MACgkQEnfvsMMhpyVF5QCdErMLJqNReKlAuQl3Pl2je+PI
3BUAoIxJ420B6lUGEEvYKqX5Oj5LdWJz
=Mvoj
-----END PGP SIGNATURE-----
SHA256 hash:47029f35d475c55a298a0b648e6f4b156e4afad9a28cd4651e642b03b9f8999e
Requirements:python, ImageMagick

Note

|filename|/images/cc0.png

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.