1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
19 #ifndef VVTOOLROIMANAGER_H
20 #define VVTOOLROIMANAGER_H
22 #include <QtDesigner/QDesignerExportWidget>
23 #include <QSharedPointer>
25 #include "vvToolBase.h"
26 #include "vvROIActor.h"
27 #include "clitkDicomRT_ROI.h"
28 #include "ui_vvToolROIManager.h"
32 //------------------------------------------------------------------------------
33 class vvToolROIManager:
35 public vvToolBase<vvToolROIManager>,
36 public Ui::vvToolROIManager
40 vvToolROIManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=Qt::Dialog);
41 virtual ~vvToolROIManager();
43 static void Initialize();
44 virtual void InputIsSelected(vvSlicerManager *m);
46 void AddImage(vvImage * binaryImage, std::string filename, double BG, bool m_modeBG=true);
47 void UpdateAllContours();
48 void UpdateAllROIStatus();
51 void AnImageIsBeingClosed(vvSlicerManager *);
52 void SelectedImageHasChanged(vvSlicerManager *);
53 void OpenBinaryImage();
56 Ui::vvToolROIManager ui;
57 vvSlicerManager * mSlicerManager;
58 vvImage * mCurrentImage;
59 vvMainWindowBase * mMainWindow;
61 int mNumberOfVisibleROI;
62 int mNumberOfVisibleContourROI;
64 vtkSmartPointer<vtkLookupTable> mDefaultLUTColor;
66 std::vector<vvImage::Pointer> mOpenedBinaryImage;
67 std::vector<clitk::DicomRT_ROI::Pointer> mROIList;
68 std::vector<QSharedPointer<vvROIActor> > mROIActorsList;
70 // Data for the widget Tree
71 std::vector< QSharedPointer<QTreeWidgetItem> > mTreeWidgetList;
72 std::map<clitk::DicomRT_ROI::Pointer, QTreeWidgetItem *> mMapROIToTreeWidget;
73 std::map<QTreeWidgetItem *, clitk::DicomRT_ROI::Pointer> mMapTreeWidgetToROI;
76 }; // end class vvToolROIManager
77 //------------------------------------------------------------------------------