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://oncora1.lyon.fnclcc.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 VVTOOLSTRUCTURESETMANAGER_H
20 #define VVTOOLSTRUCTURESETMANAGER_H
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"
29 class vvStructureSetActor;
31 //------------------------------------------------------------------------------
32 class vvToolStructureSetManager:
33 public vvToolWidgetBase,
34 public vvToolBase<vvToolStructureSetManager>,
35 private Ui::vvToolStructureSetManager
39 vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0);
40 ~vvToolStructureSetManager();
42 static void Initialize();
43 virtual void InputIsSelected(vvSlicerManager *m);
45 int AddStructureSet(clitk::DicomRT_StructureSet * mStructureSet);
46 void UpdateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s);
47 void AddRoiInTreeWidget(clitk::DicomRT_ROI * roi, QTreeWidget * w);
52 void OpenBinaryImage();
53 void SelectedItemChangedInTree();
54 void VisibleROIToggled(bool b);
55 void VisibleContourROIToggled(bool b);
56 void OpacityChanged(int v);
58 void ChangeContourColor();
59 void ChangeContourWidth(int n);
60 void AllVisibleROIToggled(int b);
61 void AllVisibleContourROIToggled(bool b);
62 void ReloadCurrentROI();
65 Ui::vvToolStructureSetManager ui;
66 clitk::DicomRT_StructureSet * mCurrentStructureSet;
67 vvStructureSetActor * mCurrentStructureSetActor;
68 int mCurrentStructureSetIndex;
69 clitk::DicomRT_ROI * mCurrentROI;
70 vvROIActor * mCurrentROIActor;
71 vtkLookupTable * mDefaultLUTColor;
72 bool mIsAllVisibleEnabled;
73 int mNumberOfVisibleROI;
74 int mNumberOfVisibleContourROI;
75 std::vector<clitk::DicomRT_StructureSet*> mStructureSetsList;
76 std::vector<vvStructureSetActor *> mStructureSetActorsList;
77 std::map<int, QTreeWidgetItem *> mMapStructureSetIndexToTreeWidget;
78 std::map<clitk::DicomRT_ROI*, QTreeWidgetItem *> mMapROIToTreeWidget;
79 std::map<QTreeWidgetItem *, clitk::DicomRT_ROI*> mMapTreeWidgetToROI;
81 void setCurrentSelectedROI(clitk::DicomRT_ROI * roi);
82 void UpdateAllROIStatus();
85 }; // end class vvToolStructureSetManager
86 //------------------------------------------------------------------------------