From: David Sarrut Date: Wed, 27 Jul 2011 09:43:33 +0000 (+0200) Subject: Replace ListOfROI (vector) by MapOfROI to avoid ambiguity between the ROI number... X-Git-Tag: v1.3.0~261 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a84258318fc97846b5e26492217490cbc15c39de;p=clitk.git Replace ListOfROI (vector) by MapOfROI to avoid ambiguity between the ROI number and the index --- diff --git a/vv/vvToolStructureSetManager.cxx b/vv/vvToolStructureSetManager.cxx index 151435f..542e50c 100644 --- a/vv/vvToolStructureSetManager.cxx +++ b/vv/vvToolStructureSetManager.cxx @@ -202,11 +202,19 @@ void vvToolStructureSetManager::AddRoiInTreeWidget(clitk::DicomRT_ROI * roi, QTr //------------------------------------------------------------------------------ void vvToolStructureSetManager::UpdateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s) { // Insert ROI + /* const std::vector & rois = s->GetListOfROI(); for(unsigned int i=0; iGetROIs().begin(); iter != s->GetROIs().end(); iter++) { + clitk::DicomRT_ROI::Pointer roi = iter->second; + if (mMapROIToTreeWidget.find(roi) == mMapROIToTreeWidget.end()) + AddRoiInTreeWidget(roi, mTree); // replace mTree with ss if several SS + } } //------------------------------------------------------------------------------ @@ -334,14 +342,14 @@ void vvToolStructureSetManager::AddImage(vvImage * binaryImage, std::string file int n = mCurrentStructureSet->AddBinaryImageAsNewROI(binaryImage, filename); mLoadedROIIndex.push_back(n); if (m_modeBG) - mCurrentStructureSet->GetROI(n)->SetBackgroundValueLabelImage(BG); + mCurrentStructureSet->GetROIFromROINumber(n)->SetBackgroundValueLabelImage(BG); else - mCurrentStructureSet->GetROI(n)->SetForegroundValueLabelImage(BG); + mCurrentStructureSet->GetROIFromROINumber(n)->SetForegroundValueLabelImage(BG); // Change color if (nGetNumberOfTableValues ()) { double * color = mDefaultLUTColor->GetTableValue(n % mDefaultLUTColor->GetNumberOfTableValues ()); - mCurrentStructureSet->GetROI(n)->SetDisplayColor(color[0], color[1], color[2]); + mCurrentStructureSet->GetROIFromROINumber(n)->SetDisplayColor(color[0], color[1], color[2]); } // Add a new roi actor