I am new to this forum and new to using DCMTK. I am corrently learing how to use the library and I have installed and compiled everything completely without errors. My next task is reading a DICOM RT structure file and writing the contents of the structure contours to file.
The test code below works fine.
What I can't do now is use something like : DCM_ROIContourSequence to get the contour data.
Code: Select all
void SimpleView::fileOpen()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
"/home",
tr("Dicom Images (*.dcm)"));
QFileInfo fi(fileName);
std::string strfname = fileName.toStdString();
//std::string strdname = fi.path().toStdString();
DcmFileFormat fileformat;
OFCondition status = fileformat.loadFile(strfname.c_str());
if (status.good())
{
OFString patientsName;
if (fileformat.getDataset()->findAndGetOFString(DCM_PatientsName, patientsName).good())
{
cout << "Patient's Name: " << patientsName << endl;
} else
cerr << "Error: cannot access Patient's Name!" << endl;
} else
cerr << "Error: cannot read DICOM file (" << status.text() << ")" << endl;
}
I know the contour points are in the ROIContourSequence : arranged as such ROIContourSequence.Item_N.ContourSequence.Item_M.ContourData
ROIContourSequence and ContourSequence are sequences (VR = SQ).
Has someone any information that might help ?
I also intend to read RTPLAND and RTDOSE files in future but first things first.
Hope to hear from someone.
GT