- University of LYON http://www.universite-lyon.fr/
- Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
- University of LYON http://www.universite-lyon.fr/
- Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
#include <vtksys/SystemTools.hxx>
//--------------------------------------------------------------------
#include <vtksys/SystemTools.hxx>
//--------------------------------------------------------------------
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mStudyID;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mStudyID;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mStudyTime;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mStudyTime;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mStudyDate;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mStudyDate;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mLabel;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mLabel;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mName;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mName;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mDate;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
return mDate;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
if (mMapOfROIIndex.find(n) == mMapOfROIIndex.end()) {
std::cerr << "No ROI number " << n << std::endl;
return NULL;
}
if (mMapOfROIIndex.find(n) == mMapOfROIIndex.end()) {
std::cerr << "No ROI number " << n << std::endl;
return NULL;
}
- DD(mListOfROI[mMapOfROIIndex[n]]->GetName());
- DD(mListOfROI[mMapOfROIIndex[n]]->GetROINumber());
+ // DD(mListOfROI[mMapOfROIIndex[n]]->GetName());
+ //DD(mListOfROI[mMapOfROIIndex[n]]->GetROINumber());
return mListOfROI[mMapOfROIIndex[n]];
}
//--------------------------------------------------------------------
return mListOfROI[mMapOfROIIndex[n]];
}
//--------------------------------------------------------------------
os << "Study ID = " << mStudyID << std::endl
<< "Study Date = " << mStudyDate << std::endl
<< "Study Time = " << mStudyTime << std::endl
os << "Study ID = " << mStudyID << std::endl
<< "Study Date = " << mStudyDate << std::endl
<< "Study Time = " << mStudyTime << std::endl
// Check file type
//Verify if the file is a RT-Structure-Set dicom file
if (!gdcm::Util::DicomStringEqual(reader.GetEntryValue(0x0008,0x0016),"1.2.840.10008.5.1.4.1.1.481.3")) { //SOP clas UID
// Check file type
//Verify if the file is a RT-Structure-Set dicom file
if (!gdcm::Util::DicomStringEqual(reader.GetEntryValue(0x0008,0x0016),"1.2.840.10008.5.1.4.1.1.481.3")) { //SOP clas UID
mLabel = reader.GetValEntry(0x3006,0x002)->GetValue();
mName = reader.GetValEntry(0x3006,0x004)->GetValue();
mTime = reader.GetValEntry(0x3006,0x009)->GetValue();
mLabel = reader.GetValEntry(0x3006,0x002)->GetValue();
mName = reader.GetValEntry(0x3006,0x004)->GetValue();
mTime = reader.GetValEntry(0x3006,0x009)->GetValue();
//----------------------------------
// Read all ROI Names and number
// 0x3006,0x0020 = [ Structure Set ROI Sequence ]
gdcm::SeqEntry * roi_seq=reader.GetSeqEntry(0x3006,0x0020);
assert(roi_seq); // TODO error message
//----------------------------------
// Read all ROI Names and number
// 0x3006,0x0020 = [ Structure Set ROI Sequence ]
gdcm::SeqEntry * roi_seq=reader.GetSeqEntry(0x3006,0x0020);
assert(roi_seq); // TODO error message
- for (gdcm::SQItem* r=roi_seq->GetFirstSQItem();r!=0;r=roi_seq->GetNextSQItem()) {
- std::string name = r->GetEntryValue(0x3006,0x0026); // 0x3006,0x0026 = [ROI Name]
+ for (gdcm::SQItem* r=roi_seq->GetFirstSQItem(); r!=0; r=roi_seq->GetNextSQItem()) {
+ std::string name = r->GetEntryValue(0x3006,0x0026); // 0x3006,0x0026 = [ROI Name]
int nb = atoi(r->GetEntryValue(0x3006,0x0022).c_str()); // 0x3006,0x0022 = [ROI Number]
// Change number if needed
int nb = atoi(r->GetEntryValue(0x3006,0x0022).c_str()); // 0x3006,0x0022 = [ROI Number]
// Change number if needed
- std::cerr << "WARNING. A Roi already exist with the number "
- << nb << ". I replace." << std::endl;
+ std::cerr << "WARNING. A Roi already exist with the number "
+ << nb << ". I replace." << std::endl;
// 0x3006,0x0039 = [ ROI Contour Sequence ]
gdcm::SeqEntry * roi_contour_seq=reader.GetSeqEntry(0x3006,0x0039);
assert(roi_contour_seq); // TODO error message
int n=0;
// 0x3006,0x0039 = [ ROI Contour Sequence ]
gdcm::SeqEntry * roi_contour_seq=reader.GetSeqEntry(0x3006,0x0039);
assert(roi_contour_seq); // TODO error message
int n=0;
DicomRT_ROI * roi = new DicomRT_ROI;
roi->Read(mMapOfROIName, r);
mListOfROI.push_back(roi);
DicomRT_ROI * roi = new DicomRT_ROI;
roi->Read(mMapOfROIName, r);
mListOfROI.push_back(roi);
-int clitk::DicomRT_StructureSet::AddBinaryImageAsNewROI(vvImage::Pointer im, std::string n) {
- DD("AddBinaryImageAsNewROI");
+int clitk::DicomRT_StructureSet::AddBinaryImageAsNewROI(vvImage::Pointer im, std::string n)
+{
+ //DD("AddBinaryImageAsNewROI");
- oss << vtksys::SystemTools::GetFilenameName(vtksys::SystemTools::GetFilenameWithoutLastExtension(n))
- << "_roi_" << max << vtksys::SystemTools::GetFilenameLastExtension(n);
- DD(oss.str());
+ oss << vtksys::SystemTools::GetFilenameName(vtksys::SystemTools::GetFilenameWithoutLastExtension(n));
+ // << "_roi_" << max << vtksys::SystemTools::GetFilenameLastExtension(n);
+ //DD(oss.str());