X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolStructureSetManager.h;h=5bc88c2d479100363d0b9864fca143a4d87046a7;hb=c91252d780814d0d771464cdbce0f0a2cf94e891;hp=e77f127e09bdea58f68b8ed1c36c1b06e68df1c5;hpb=1f2d49aa5d3d0e8d5913967e5464505e6f7a61c5;p=clitk.git diff --git a/vv/vvToolStructureSetManager.h b/vv/vvToolStructureSetManager.h index e77f127..5bc88c2 100644 --- a/vv/vvToolStructureSetManager.h +++ b/vv/vvToolStructureSetManager.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,18 +14,24 @@ - 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 +#if QT_VERSION >= 0x050000 +#include +#else #include +#endif #include "vvToolBase.h" #include "vvToolWidgetBase.h" #include "clitkDicomRT_StructureSet.h" #include "ui_vvToolStructureSetManager.h" #include "vvROIActor.h" +#include + class vvStructureSetActor; //------------------------------------------------------------------------------ @@ -35,9 +41,9 @@ class vvToolStructureSetManager: private Ui::vvToolStructureSetManager { Q_OBJECT - public: - vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0); - ~vvToolStructureSetManager(); + public: + vvToolStructureSetManager(vvMainWindowBase* parent=0, Qt::WindowFlags f=0, vvSlicerManager * c = NULL); + virtual ~vvToolStructureSetManager(); static void Initialize(); virtual void InputIsSelected(vvSlicerManager *m); @@ -46,6 +52,10 @@ 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); @@ -57,30 +67,41 @@ public slots: void ChangeColor(); void ChangeContourColor(); void ChangeContourWidth(int n); + void ChangeDepth(int n); void AllVisibleROIToggled(int b); void AllVisibleContourROIToggled(bool b); 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; + vtkSmartPointer mDefaultLUTColor; bool mIsAllVisibleEnabled; int mNumberOfVisibleROI; int mNumberOfVisibleContourROI; - std::vector mStructureSetsList; - std::vector mStructureSetActorsList; - std::map mMapStructureSetIndexToTreeWidget; - std::map mMapROIToTreeWidget; - std::map mMapTreeWidgetToROI; + 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 int m_NumberOfTool; + bool MustOpenDialogWhenCreated; }; // end class vvToolStructureSetManager //------------------------------------------------------------------------------