This module contains classes to manage DICOM data structures and files. It also provides support for DICOMDIR files as required for DICOM storage media.
The main interface classes are:
Tools
This module contains the following command line tools:
- dcm2pdf
- dcm2xml
- dcmconv
- dcmcrle
- dcmdrle
- dcmdump
- dcmftest
- dcmgpdir
- dcmodify
- dump2dcm
- img2dcm
- pdf2dcm
- xml2dcm
Files
The following file provides further documentation:
Examples
The following example shows how to load a DICOM file and output the patient's name:
{
{
cout << "Patient's Name: " << patientName << endl;
} else
cerr << "Error: cannot access Patient's Name!" << endl;
} else
cerr <<
"Error: cannot read DICOM file (" << status.
text() <<
")" << endl;
The following example shows how to create a DICOM dataset and save it to a file:
char uid[100];
dataset->
putAndInsertString(DCM_SOPInstanceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT));
cerr <<
"Error: cannot write DICOM file (" << status.
text() <<
")" << endl;
The following example shows how to create a general purpose DICOMDIR from multiple files:
{
while ( )
cerr <<
"Error: cannot write DICOMDIR (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot create DICOMDIR (" << status.
text() <<
")" << endl;