X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolROIManager.cxx;h=6b4c66cdf368c5b645a8cf9bafa28d6ff36925e3;hb=9850d1cd9cbe91c5e2b5e4fcf217d30cfcecc621;hp=8b0a48753671fc735e6cfed736dae8d62bfda1d1;hpb=14fb12213453c642d28ec0d0241526c0e674c253;p=clitk.git diff --git a/vv/vvToolROIManager.cxx b/vv/vvToolROIManager.cxx index 8b0a487..6b4c66c 100644 --- a/vv/vvToolROIManager.cxx +++ b/vv/vvToolROIManager.cxx @@ -104,9 +104,9 @@ vvToolROIManager::~vvToolROIManager() // STATIC void vvToolROIManager::Initialize() { SetToolName("ROIManager"); - SetToolMenuName("Display ROI (binary image)"); + SetToolMenuName("Open ROI (binary image or RT-STRUCT)"); SetToolIconFilename(":/common/icons/tool-roi.png"); - SetToolTip("Display ROI from a binary image."); + SetToolTip("Display ROI from a binary image or a RT-struct file."); SetToolExperimental(false); } //------------------------------------------------------------------------------ @@ -359,6 +359,7 @@ void vvToolROIManager::OpenDicomImage(std::string filename) // GUI selector of roi vvMeshReader reader; reader.SetFilename(filename); + vvStructSelector selector; selector.SetStructures(reader.GetROINames()); selector.SetPropagationCheckBoxFlag(false); @@ -370,13 +371,13 @@ void vvToolROIManager::OpenDicomImage(std::string filename) // Read information clitk::DicomRT_StructureSet::Pointer s = clitk::DicomRT_StructureSet::New(); - s->Read(filename); + s->Read(filename); //FIXME // Loop on selected struct std::vector list = selector.getSelectedItems(); for (uint i=0; iUpdate(); } - for(int i=0; iGetNumberOfSlicers(); i++) { - mCurrentSlicerManager->GetSlicer(i)->Render(); - } + mCurrentSlicerManager->Render(); } //------------------------------------------------------------------------------ @@ -679,6 +678,8 @@ void vvToolROIManager::ChangeColor() { mCurrentROIActor->GetROI()->GetDisplayColor()[1], mCurrentROIActor->GetROI()->GetDisplayColor()[2]); QColor c = QColorDialog::getColor(color, this, "Choose the ROI color"); + if (!c.isValid()) return;// User cancel + mCurrentROIActor->GetROI()->SetDisplayColor(c.redF(), c.greenF(), c.blueF()); mCurrentROIActor->UpdateColor();