dcmtk-basic-example demonstrats how to compile, link and include dcmtk 3.6.0 toolkit for developing C++11 programs to process DICOM images. The example was developed and tested on Ubuntu 14.04.
When wanting to use dcmtk libraries in my own C++ code, I noticed that basic examples how to link and use dcmtk in Ubuntu 14.04 are scarse. Thus, I decided to make this simple example, to help you guys get started with dcmtk.
sudo apt-get install build-essential cmake libdcmtk2-dev
git clone https://github.com/marcinwol/dcmtk-basic-example
cd dcmtk-basic-example
cmake .
make
For this example C++11 program, I used images avaliable here
Still being in the dcmtk-basic-example:
wget https://dl.dropboxusercontent.com/s/w28rorcufnaddua/77654033_20010101.tar.bz2
mkdir DCMIMAGES
tar -xjvf 77654033_20010101.tar.bz2 -C DCMIMAGES/
rm 77654033_20010101.tar.bz2
./testDCMTK
The output should be:
Patient name is: Doe^Archibald
Program finish.