X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_StructureSet.cxx;h=41cddc2178405df13dd5222af0f09b595e355ac3;hb=18fd13ca69bbe5a6d91e070fef22ca9c64c92063;hp=fb23570f78156124d5cb5a0f33aa7786ab9d0736;hpb=1e034c70105f0926939acaaa27ddb46e904ae8bf;p=clitk.git diff --git a/common/clitkDicomRT_StructureSet.cxx b/common/clitkDicomRT_StructureSet.cxx index fb23570..41cddc2 100644 --- a/common/clitkDicomRT_StructureSet.cxx +++ b/common/clitkDicomRT_StructureSet.cxx @@ -37,7 +37,9 @@ clitk::DicomRT_StructureSet::DicomRT_StructureSet() //-------------------------------------------------------------------- clitk::DicomRT_StructureSet::~DicomRT_StructureSet() { - + for(uint i=0; iGetName()); - DD(mListOfROI[mMapOfROIIndex[n]]->GetROINumber()); + // DD(mListOfROI[mMapOfROIIndex[n]]->GetName()); + //DD(mListOfROI[mMapOfROIIndex[n]]->GetROINumber()); return mListOfROI[mMapOfROIIndex[n]]; } //-------------------------------------------------------------------- @@ -211,24 +213,24 @@ void clitk::DicomRT_StructureSet::Read(const std::string & filename) //-------------------------------------------------------------------- -int clitk::DicomRT_StructureSet::AddBinaryImageAsNewROI(vvImage::Pointer im, std::string n) +int clitk::DicomRT_StructureSet::AddBinaryImageAsNewROI(vvImage * im, std::string n) { - DD("AddBinaryImageAsNewROI"); + //DD("AddBinaryImageAsNewROI"); // Search max ROI number int max = -1; for(unsigned int i=0; iGetROINumber() > max) max = mListOfROI[i]->GetROINumber(); } - DD(max); + // DD(max); ++max; - DD(max); + //DD(max); // Compute name std::ostringstream oss; - 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()); mMapOfROIName[max] = oss.str(); // Set color @@ -239,13 +241,10 @@ int clitk::DicomRT_StructureSet::AddBinaryImageAsNewROI(vvImage::Pointer im, std // Create ROI DicomRT_ROI * roi = new DicomRT_ROI; - roi->SetFromBinaryImage(im, - max, - oss.str(), - color); + roi->SetFromBinaryImage(im, max, oss.str(), color, n); mListOfROI.push_back(roi); mMapOfROIIndex[mListOfROI.size()-1] = max; - DD(mMapOfROIIndex[mListOfROI.size()-1]); + //DD(mMapOfROIIndex[mListOfROI.size()-1]); return max; } //--------------------------------------------------------------------