As a radiologist, I spend my working life interacting with medical images in the form of DICOM files through various software viewers. There are lots of improvements I’ve wanted to make to these viewers as well as other side project ideas I’ve had that would require reading / manipulating DICOMs. My favoured programming language is Xojo but this language provides no native way of reading DICOMs nor are there any available third party solutions to do so (at least at the time of writing). I decided that it would be a “good” idea to try to write my own module not only to achieve my goal of later using this module in future projects but also as a way to better understand the underlying software that powers my day-to-day life.
I call this module DICOMKit.
At the time of writing, DICOMKit is capable of checking if a file is in the DICOM format, parsing it into its constituent elements and of extracting the image(s) stored within it as a Xojo Picture object. It currently only supports images stored in an uncompressed format although I do want to support other formats (mostly lossless JPEG and JPEG Baseline) in the future once I wrap my head around the decompression algorithms.
DICOMKit is 100% native Xojo code and does not require any third party dependencies, even though the project would progress faster with them. DICOMKit also compiles for all platforms supported by Xojo, including iOS and the Raspberry Pi.
It’s my intention to write a series of articles about the technical structure of DICOM files at some point in the future. I provide no time frame for this to happen.
Finally, whilst technically DICOMKit is open source, I’m not looking for it to be a truly collaborative project. I don’t mind you modifying or forking it and I do hope that you’ll find it useful and report bugs about them. At the same time I don’t plan on accepting patches for it. I prefer to keep things under my control and don’t have the time to worry about managing a burgeoning open source endeavour.
Of course, if there’s a patch or issue that needs to be fixed, as long as there is an understanding that I will re-implement any patch you send (which implies, among others, that you should explain what the patch’s code does) feel free to send it to me. However, I don’t promise that I’ll actually implement it. If I do decide to use it, it’ll be as a source of inspiration and a point of reference for the feature or bug fix that you need implemented.