X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolStructureSetManager.cxx;h=f625e4cd46ef0945fa3c40df9036a2be50e547ee;hb=2300716104b55267692efc2c0e506b3c5c45df38;hp=b4243596907338d5b1ccdff5ece3e6950a9e5a9f;hpb=5999f0266615dddfc3d2e885d8fb9e60b5172058;p=clitk.git diff --git a/vv/vvToolStructureSetManager.cxx b/vv/vvToolStructureSetManager.cxx index b424359..f625e4c 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