]> Creatis software - clitk.git/blob - vv/vvToolStructureSetManager.h
- display binary image as overlay
[clitk.git] / vv / vvToolStructureSetManager.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://oncora1.lyon.fnclcc.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 VVTOOLSTRUCTURESETMANAGER_H
20 #define VVTOOLSTRUCTURESETMANAGER_H
21
22 #include <QtDesigner/QDesignerExportWidget>
23 #include "vvToolBase.h"
24 #include "vvToolWidgetBase.h"
25 #include "clitkDicomRT_StructureSet.h"
26 #include "ui_vvToolStructureSetManager.h"
27
28 class vvStructureSetActor;
29
30 //------------------------------------------------------------------------------
31 class vvToolStructureSetManager:
32   public vvToolWidgetBase,
33   public vvToolBase<vvToolStructureSetManager>, 
34   private Ui::vvToolStructureSetManager
35 {
36   Q_OBJECT
37     public:
38   vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0);
39   ~vvToolStructureSetManager();
40
41   static void Initialize();
42   virtual void InputIsSelected(vvSlicerManager *m);
43
44   int addStructureSet(clitk::DicomRT_StructureSet * mStructureSet);
45   void updateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s);
46   void addRoiInTreeWidget(clitk::DicomRT_ROI * roi, QTreeWidgetItem * w);
47
48 public slots:
49   virtual void apply();
50   void open(int type);
51   void LeftButtonReleaseEvent(int slicer);
52   void openBinaryImage();
53   void selectedItemChangedInTree();
54
55  protected:
56   Ui::vvToolStructureSetManager ui;
57   clitk::DicomRT_StructureSet * mCurrentStructureSet;
58   vvStructureSetActor * mCurrentStructureSetActor;
59   int mCurrentStructureSetIndex;
60   vtkLookupTable * mDefaultLUTColor;
61  
62   void setCurrentSelectedROI(clitk::DicomRT_ROI * roi);
63  
64   std::vector<clitk::DicomRT_StructureSet*> mStructureSetsList;
65   std::vector<vvStructureSetActor *> mStructureSetActorsList;
66   std::map<int, QTreeWidgetItem *> mMapStructureSetIndexToTreeWidget;
67   std::map<clitk::DicomRT_ROI*, QTreeWidgetItem *> mMapROIToTreeWidget;
68   std::map<QTreeWidgetItem *, clitk::DicomRT_ROI*> mMapTreeWidgetToROI;
69
70 }; // end class vvToolStructureSetManager
71 //------------------------------------------------------------------------------
72
73 #endif
74