Dicomlib
Description
This is an all-new dicom library. It is inspired by the ucdmc99 library,
but has been almost completely re-written, with the goal of providing a clean, simple
API, close adherance to the DICOM standard and rigourous type safety. A lot of thought
has gone into the best way of mapping DICOM concepts, such as 'Value Representations'
to C++ concepts such as 'types'.
The result is a library that makes it possible to very quickly integrate DICOM
functionality into your application.
Example
This example will open a dicom file and print its contents to standard output.
#include "dicomlib.hpp"
using namespace dicom;
int main(int,char**)
{
ifstream In("MyDicomFile.dcm",ios::binary);
DataSet data;
ReadFromStream(In,data);
cout << data;
return 0;
}
Status
The current version is 0.9.0
It is already being used to power several applications developed by
the Imaging Research Group at Sunnybrook and Women's College Health Sciences Centre
download
Download the library here:
dicomlib.zip
or here:
dicomlib.tar.gz
History
This library originates in the UCDMC DICOM Network Transport Libraries, written
by Mark Oskin at the Medical Center
of the University of California, Davis. It was modified and enhanced
by Gunter Zeilinger at Karl-Franzens-Universitat,
Graz, Austria.
The library is now maintained by the imaging research group at Sunnybrook and Women's College
Health Sciences Center.
The maintainer is Trevor
Morgan
I pretty much re-wrote the whole thing from scratch, using the UCDMC99 library
as inspiration, but with the aim of making the whole thing easier to use, more robust,
and harder to mis-use. Some key new features:
- Template mechanism for enforcing relationships between dicom VRs and c++ types
- Multithreading server mechanism using the boost::thread library
- Vastly improved API
The DICOM standard can be a pretty ugly thing to have to deal with; I am trying to
take away as much pain as possible for the application programmer.
Platforms
The library is designed to be as cross-platform as possible, and targets Windows
and Unix platforms. So far I have tested it on Windows 2000, XP, Linux (intel)
and Solaris (sparc).
Where possible it strives to use facilites provided
by the C++ standard library rather than platform specific constructs.
Documentation
Can be viewed online here
Dependencies
With the intention of avoiding re-inventing the wheel, dicomlib makes heavy use of the
Boost C++ libraries. You will need to install and compile
these before trying to compile dicomlib. (You should check these out anyway if you do
any C++ programming at all - Boost is an amazingly useful resource that's saved me countless
hours of work.)
Building
Project files are provided for Microsoft Visual Studio 7.0. On Unix platforms,
I use the scons build tool, which is
a Python-based make replacement. I realise this adds another dependency
when trying to build the libraries, but by experience is that scons is so
much more powerful and easier to work with than make that it is definitely
worth it.
Bugs
Please report any bugs you find to Trevor
Morgan
License
The library is licensed under the GNU GPL
Make sure you understand the implications of this license before using this software