X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolStructureSetManager.h;h=4d4cf505e4dd405d3574a36ee0f353b434ec5477;hb=880e33e1299652f7a55ff47b8d65eb89f5578e5e;hp=842147325772d915edbf052582dcba7958fe60b7;hpb=cb4f548b5df0172cc7fad02345d7eb3d7a4fa3aa;p=clitk.git diff --git a/vv/vvToolStructureSetManager.h b/vv/vvToolStructureSetManager.h index 8421473..4d4cf50 100644 --- a/vv/vvToolStructureSetManager.h +++ b/vv/vvToolStructureSetManager.h @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ + ======================================================================-====*/ #ifndef VVTOOLSTRUCTURESETMANAGER_H #define VVTOOLSTRUCTURESETMANAGER_H @@ -35,27 +35,37 @@ class vvToolStructureSetManager: private Ui::vvToolStructureSetManager { Q_OBJECT - public: - vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0); + public: + vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0, vvSlicerManager * c = NULL); ~vvToolStructureSetManager(); static void Initialize(); virtual void InputIsSelected(vvSlicerManager *m); - int addStructureSet(clitk::DicomRT_StructureSet * mStructureSet); - void updateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s); - void addRoiInTreeWidget(clitk::DicomRT_ROI * roi, QTreeWidgetItem * w); + int AddStructureSet(clitk::DicomRT_StructureSet * mStructureSet); + void UpdateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s); + void AddRoiInTreeWidget(clitk::DicomRT_ROI * roi, QTreeWidget * w); + + static vvToolStructureSetManager * AddImage(vvSlicerManager * m, std::string name, vvImage::Pointer image, double BG, bool modeBG=true); + void AddImage(vvImage::Pointer image, std::string filename, double BG, bool modeBG=true); + void UpdateImage(); public slots: virtual void apply(); - void open(int type); - void LeftButtonReleaseEvent(int slicer); - void openBinaryImage(); - void selectedItemChangedInTree(); - void visibleROIToggled(bool b); - void opacityChanged(int v); - - protected: + void Open(int type); + void OpenBinaryImage(); + void SelectedItemChangedInTree(); + void VisibleROIToggled(bool b); + void VisibleContourROIToggled(bool b); + void OpacityChanged(int v); + void ChangeColor(); + void ChangeContourColor(); + void ChangeContourWidth(int n); + void AllVisibleROIToggled(int b); + void AllVisibleContourROIToggled(bool b); + void ReloadCurrentROI(); + +protected: Ui::vvToolStructureSetManager ui; clitk::DicomRT_StructureSet * mCurrentStructureSet; vvStructureSetActor * mCurrentStructureSetActor; @@ -63,15 +73,28 @@ public slots: clitk::DicomRT_ROI * mCurrentROI; vvROIActor * mCurrentROIActor; vtkLookupTable * mDefaultLUTColor; - - void setCurrentSelectedROI(clitk::DicomRT_ROI * roi); - - std::vector mStructureSetsList; - std::vector mStructureSetActorsList; - std::map mMapStructureSetIndexToTreeWidget; + bool mIsAllVisibleEnabled; + int mNumberOfVisibleROI; + int mNumberOfVisibleContourROI; + std::vector mStructureSetsList; + std::vector mStructureSetActorsList; + std::map mMapStructureSetIndexToTreeWidget; std::map mMapROIToTreeWidget; std::map mMapTreeWidgetToROI; + std::vector mLoadedROIIndex; + + void setCurrentSelectedROI(clitk::DicomRT_ROI * roi); + void UpdateAllROIStatus(); + virtual bool close(); + virtual void closeEvent(QCloseEvent *event); + // Management of all instances + virtual void CheckInputList(std::vector & l, int & index); + static std::vector mListOfInputs; + static std::map mListOfOpenTool; + static int m_NumberOfTool; + bool MustOpenDialogWhenCreated; + }; // end class vvToolStructureSetManager //------------------------------------------------------------------------------