]> Creatis software - clitk.git/blob - vv/vvToolStructureSetManager.h
- small correction about Render (a bit less unuseful Render)
[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 #include "vvROIActor.h"
28
29 class vvStructureSetActor;
30
31 //------------------------------------------------------------------------------
32 class vvToolStructureSetManager:
33   public vvToolWidgetBase,
34   public vvToolBase<vvToolStructureSetManager>, 
35   private Ui::vvToolStructureSetManager
36 {
37   Q_OBJECT
38     public:
39   vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0);
40   ~vvToolStructureSetManager();
41
42   static void Initialize();
43   virtual void InputIsSelected(vvSlicerManager *m);
44
45   int addStructureSet(clitk::DicomRT_StructureSet * mStructureSet);
46   void updateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s);
47   void addRoiInTreeWidget(clitk::DicomRT_ROI * roi, QTreeWidgetItem * w);
48
49 public slots:
50   virtual void apply();
51   void open(int type);
52   void LeftButtonReleaseEvent(int slicer);
53   void openBinaryImage();
54   void selectedItemChangedInTree();
55   void visibleROIToggled(bool b);
56   void opacityChanged(int v);
57   void changeColor();
58
59  protected:
60   Ui::vvToolStructureSetManager ui;
61   clitk::DicomRT_StructureSet * mCurrentStructureSet;
62   vvStructureSetActor * mCurrentStructureSetActor;
63   int mCurrentStructureSetIndex;
64   clitk::DicomRT_ROI * mCurrentROI;
65   vvROIActor * mCurrentROIActor;
66   vtkLookupTable * mDefaultLUTColor;
67  
68   void setCurrentSelectedROI(clitk::DicomRT_ROI * roi);
69  
70   std::vector<clitk::DicomRT_StructureSet*> mStructureSetsList;
71   std::vector<vvStructureSetActor *> mStructureSetActorsList;
72   std::map<int, QTreeWidgetItem *> mMapStructureSetIndexToTreeWidget;
73   std::map<clitk::DicomRT_ROI*, QTreeWidgetItem *> mMapROIToTreeWidget;
74   std::map<QTreeWidgetItem *, clitk::DicomRT_ROI*> mMapTreeWidgetToROI;
75
76 }; // end class vvToolStructureSetManager
77 //------------------------------------------------------------------------------
78
79 #endif
80