X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolStructureSetManager.h;h=89af5abdda17d4ba9bd034b0c90ec4b225609977;hb=50eb3bd187cc86e6e4e331ccbbbfc016c8afb6b1;hp=0cd747345e302d85df99a1b0055040cfa4ba9e77;hpb=268aa9a5e0a301987a01952522a1cfb3c2fbb152;p=clitk.git diff --git a/vv/vvToolStructureSetManager.h b/vv/vvToolStructureSetManager.h index 0cd7473..89af5ab 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 @@ -26,6 +26,8 @@ #include "ui_vvToolStructureSetManager.h" #include "vvROIActor.h" +#include + class vvStructureSetActor; //------------------------------------------------------------------------------ @@ -35,8 +37,8 @@ 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(); @@ -46,10 +48,13 @@ class vvToolStructureSetManager: 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 * 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); @@ -58,29 +63,42 @@ public slots: void ChangeColor(); void ChangeContourColor(); void ChangeContourWidth(int n); - void AllVisibleROIToggled(bool b); + void AllVisibleROIToggled(int b); void AllVisibleContourROIToggled(bool b); - void AllOpacityChanged(int v); + void ReloadCurrentROI(); - protected: +protected: Ui::vvToolStructureSetManager ui; - clitk::DicomRT_StructureSet * mCurrentStructureSet; + clitk::DicomRT_StructureSet* mCurrentStructureSet; vvStructureSetActor * mCurrentStructureSetActor; int mCurrentStructureSetIndex; - clitk::DicomRT_ROI * mCurrentROI; + clitk::DicomRT_ROI::Pointer mCurrentROI; vvROIActor * mCurrentROIActor; - vtkLookupTable * mDefaultLUTColor; - - void setCurrentSelectedROI(clitk::DicomRT_ROI * roi); - - std::vector mStructureSetsList; - std::vector mStructureSetActorsList; - std::map mMapStructureSetIndexToTreeWidget; - std::map mMapROIToTreeWidget; - std::map mMapTreeWidgetToROI; + vtkSmartPointer mDefaultLUTColor; bool mIsAllVisibleEnabled; int mNumberOfVisibleROI; + int mNumberOfVisibleContourROI; + std::vector mStructureSetsList; + std::vector< QSharedPointer > mStructureSetActorsList; + std::vector< QSharedPointer > mTreeWidgetList; + std::map mMapROIToTreeWidget; + std::map mMapTreeWidgetToROI; + std::vector mLoadedROIIndex; + std::vector mOpenedBinaryImage; + + 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 bool mDestroyed; + static int m_NumberOfTool; + bool MustOpenDialogWhenCreated; + }; // end class vvToolStructureSetManager //------------------------------------------------------------------------------