- DicomRT_ROI::Pointer roi = DicomRT_ROI::New();
- roi->Read(mMapOfROIInfo[nb], mMapOfROIContours[nb]);
- // mListOfROI.push_back(roi);
- // mMapOfROIIndex[nb] = i;
- mROIs[nb] = roi;
- }
-
- //----------------------------------------------------------------------------------------
- //----------------------------------------------------------------------------------------
- //----------------------------------------------------------------------------------------
-#else
- mFile = new gdcm::File;
- mFile->SetFileName(filename.c_str());
- mFile->SetMaxSizeLoadEntry(16384); // Needed ...
- mFile->SetLoadMode(gdcm::LD_NOSHADOW); // don't load shadow tags (in order to save memory)
- mFile->Load();
-
- // Check file type
- //Verify if the file is a RT-Structure-Set dicom file
- if (!gdcm::Util::DicomStringEqual(mFile->GetEntryValue(0x0008,0x0016),"1.2.840.10008.5.1.4.1.1.481.3")) { //SOP clas UID
- std::cerr << "Error. the file " << filename
- << " is not a Dicom Struct ? (must have a SOP Class UID [0008|0016] = 1.2.840.10008.5.1.4.1.1.481.3 ==> [RT Structure Set Storage])"
- << std::endl;
- exit(0);
- }
- if (!gdcm::Util::DicomStringEqual(mFile->GetEntryValue(0x0008,0x0060),"RTSTRUCT")) { //SOP clas UID
- std::cerr << "Error. the file " << filename
- << " is not a Dicom Struct ? (must have 0x0008,0x0060 = RTSTRUCT [RT Structure Set Storage])"
- << std::endl;
- exit(0);
- }
-
- // Read global info
- mStudyID = mFile->GetValEntry(0x0020,0x0010)->GetValue();
- mStudyTime = mFile->GetValEntry(0x008,0x0020)->GetValue();
- mStudyDate = mFile->GetValEntry(0x008,0x0030)->GetValue();
- mLabel = mFile->GetValEntry(0x3006,0x002)->GetValue();
- if (!mFile->GetValEntry(0x3006,0x004)) {
- mName = "Anonymous";