]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/managerUR.h
DFCH: ManualPaint + imageUndoRedo: Undo/Redo functionality its now working =) =)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / managerUR.h
1 /*!
2  * @file        managerUR.h
3  * @brief       This file contains the ManagerUR class. -- Abstract class
4  * @author      Info-Dev
5  * @author      Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
6  * @date        2011-11-15
7  */
8
9 #ifndef MANAGERUR_H_
10 #define MANAGERUR_H_
11
12 #include <iostream>
13 #include <string>
14 #include <vtkImageData.h>
15 #include <vtkSmartPointer.h>
16 #include <vtkExtractVOI.h>
17
18 #include "image3DDequeUR.h"
19 #include "imageModificationManager.h"
20 #include "regionStructUR.h"
21 #include "imageInfoUR.h"
22
23 /*! @class ManagerUR managerUR.h "managerUR.cxx"
24  *      @brief This class manages the Undo/Redo -- Abstract Class.
25  *      @details This class allows the communication between others libraries who wants to use it.
26  */
27 class ManagerUR {
28 public:
29         //typedef definition
30         // ----------------------------------------------------------------------------------
31         /*!     @typedef RegionStructUR RegionSType;
32          *      @brief Redefines the ImageMManagerType.
33          */
34         typedef RegionStructUR RegionSType;
35         // ----------------------------------------------------------------------------------
36         /*!     @typedef ImageMManager ImageMManagerType;
37          *      @brief Redefines the ImageMManager type.
38          */
39         typedef ImageMManager ImageMManagerType;
40         // ----------------------------------------------------------------------------------
41         /*!     @typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
42          *      @brief Defines the pointer of vtkImageDate type.
43          */
44         typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
45         // ----------------------------------------------------------------------------------
46         /*!     @typedef vtkSmartPointer<vtkExtractVOI> VTKExtractVOIPointerType;
47          *      @brief Defines the pointer of vtkExtractVOI type.
48          */
49         typedef vtkSmartPointer<vtkExtractVOI> VTKExtractVOIPointerType;
50         // ----------------------------------------------------------------------------------
51         /*!     @typedef std::string StringType;
52          *      @brief Redefinition of the string type
53          */
54         typedef std::string StringType;
55         // ----------------------------------------------------------------------------------
56 public:
57         // ----------------------------------------------------------------------------------
58         /*! @fn ManagerUR();
59          * @brief This is the default constructor.
60          */
61         ManagerUR();
62         // ----------------------------------------------------------------------------------
63         /*! @fn virtual ~ManagerUR();
64          * @brief This is the destructor.
65          */
66         virtual ~ManagerUR();
67         // ----------------------------------------------------------------------------------
68         /*! @fn virtual void Undo();
69          * @brief This method manages the undo action.
70          */
71         virtual void Undo();
72         // ----------------------------------------------------------------------------------
73         /*! @fn virtual void Redo();
74          * @brief This method manages the redo action.
75          */
76         virtual void Redo();
77         // ----------------------------------------------------------------------------------
78         /*! @fn virtual void SetImage(VTKImageDataPointerType image);
79          * @brief This method sets the modification image (The image which will be modified an manipulated)
80          */
81         virtual void SetImage(VTKImageDataPointerType image);
82         // ----------------------------------------------------------------------------------
83         /*! @fn virtual void SetURImages(ImageMManagerType* imMManager);
84          * @brief This methods adds a new image Undo/Redo.
85          */
86         virtual void SetURImages(ImageMManagerType* imMManager);
87         // ----------------------------------------------------------------------------------
88 protected:
89         // ----------------------------------------------------------------------------------
90         /*! @fn virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
91          * @brief This method writes in the visualized image the changes of the undo/redo.
92          */
93         virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
94         // ----------------------------------------------------------------------------------
95 };
96
97 #endif /* MANAGERUR_H_ */