This module contains classes to read, write, create, modify and access various DICOM Radiation Therapy (RT) objects. These classes are generated from a machine-readable description of the DICOM standard.
The main interface classes are:
To simplify working with this low-level interface, there are some hand-written classes which provide commonly needed functionality.
These classes are:
Tools
This module contains the following command line tools:
Examples
The following example shows how to load an RT Dose file and output the patient's name:
{
{
{
cout << "Patient's Name: " << patientName << endl;
} else
cerr <<
"Error: cannot access Patient's Name (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot read RT Dose object (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot load DICOM file (" << status.
text() <<
")" << endl;
The following example shows how to load an RT Dose file and access the scaled dose image:
{
const unsigned int frame = 0;
{
for (int y = 0; y < doseImage.getDoseImageHeight(); ++y)
{
for (int x = 0; x < doseImage.getDoseImageWidth(); ++x)
{
double value = *it++;
}
}
} else
cerr <<
"Error: cannot read RT Dose image (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot load RT Dose object (" << status.
text() <<
")" << endl;
The following example shows how to load an RT Plan file, change the patient's name and save it to a new file:
{
{
{
{
status = fileformat.
saveFile(
"rtplan_new.dcm");
cerr <<
"Error: cannot save DICOM file (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot write RT Plan object (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot change Patient's Name (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot read RT Plan object (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot load DICOM file (" << status.
text() <<
")" << endl;