]> Creatis software - clitk.git/blob - vv/vvToolROIManager.h
First version that allow to open file (no button feedback yet)
[clitk.git] / vv / vvToolROIManager.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
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
8
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.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17   ===========================================================================**/
18
19 #ifndef VVTOOLROIMANAGER_H
20 #define VVTOOLROIMANAGER_H
21
22 #include <QtDesigner/QDesignerExportWidget>
23 #include <QSharedPointer>
24
25 #include "vvToolBase.h"
26 #include "vvROIActor.h"
27 #include "clitkDicomRT_ROI.h"
28 #include "ui_vvToolROIManager.h"
29
30 class vvROIActor;
31
32 //------------------------------------------------------------------------------
33 class vvToolROIManager:
34   public QWidget, 
35   public vvToolBase<vvToolROIManager>, 
36   public Ui::vvToolROIManager
37 {
38   Q_OBJECT
39   public:
40   vvToolROIManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=Qt::Dialog);
41   virtual ~vvToolROIManager();
42
43   static void Initialize();
44   virtual void InputIsSelected(vvSlicerManager *m);
45
46   void AddImage(vvImage * binaryImage, std::string filename, double BG, bool m_modeBG=true);
47   void UpdateAllContours();
48   void UpdateAllROIStatus();
49
50   public slots:
51   void AnImageIsBeingClosed(vvSlicerManager *);
52   void SelectedImageHasChanged(vvSlicerManager *);
53   void OpenBinaryImage();
54
55 protected:
56   Ui::vvToolROIManager ui;
57   vvSlicerManager * mSlicerManager;
58   vvImage * mCurrentImage;
59   vvMainWindowBase * mMainWindow;
60   
61   int mNumberOfVisibleROI;
62   int mNumberOfVisibleContourROI;
63
64   vtkSmartPointer<vtkLookupTable> mDefaultLUTColor;
65
66   std::vector<vvImage::Pointer> mOpenedBinaryImage;
67   std::vector<clitk::DicomRT_ROI::Pointer> mROIList;
68   std::vector<QSharedPointer<vvROIActor> > mROIActorsList;
69
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;
74   
75  
76 }; // end class vvToolROIManager
77 //------------------------------------------------------------------------------
78
79 #endif
80