]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageUndoRedo.h
66be0fc17e432259e2668f3db4ffa884847f0e24
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageUndoRedo.h
1 /*!
2  * @file        imageUndoRedo.h
3  * @brief       This file contains the ImageUndoRedo 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 IMAGEUNDOREDO_H_
10 #define IMAGEUNDOREDO_H_
11
12 #include "managerUR.h"
13
14 /*! @class ImageUndoRedo imageUndoRedo.h "imageUndoRedo.cxx"
15  *      @brief This class manages the undo/redo -- Concrete Class
16  *      @details This class derives from ManagerUR
17  */
18 class ImageUndoRedo: public ManagerUR {
19
20 public:
21         //typedef definition
22         // ----------------------------------------------------------------------------------
23         /*!     @typedef typedef Image3DDequeUR IDequeType;
24          *      @brief Redefines the Image3DDequeUR type
25          */
26         typedef Image3DDequeUR IDequeType;
27         // ----------------------------------------------------------------------------------
28 public:
29         // ----------------------------------------------------------------------------------
30         /*! @fn ImageUndoRedo();
31          * @brief This is the default constructor.
32          */
33         ImageUndoRedo();
34         // ----------------------------------------------------------------------------------
35         /*! @fn virtual ~ImageUndoRedo();
36          * @brief This is the destructor.
37          */
38         virtual ~ImageUndoRedo();
39         // ----------------------------------------------------------------------------------
40         /*! @fn virtual void Undo();
41          * @brief This method manages the undo action.
42          */
43         virtual void Undo();
44         // ----------------------------------------------------------------------------------
45         /*! @fn virtual void Redo();
46          * @brief This method manages the redo action.
47          */
48         virtual void Redo();
49         // ----------------------------------------------------------------------------------
50         /*! @fn virtual void SetImage(VTKImageDataPointerType image);
51          * @brief This method sets the modification image (The image which will be modified an manipulated)
52          */
53         virtual void SetImage(VTKImageDataPointerType image);
54         // ----------------------------------------------------------------------------------
55         /*! @fn virtual void SetURImages(ImageMManagerType* imMManager);
56          * @brief This methods adds a new image Undo/Redo.
57          */
58         virtual void SetURImages(ImageMManagerType* imMManager);
59         // ----------------------------------------------------------------------------------
60         /*! @fn void UpdateUndoImage();
61          * @brief This method updates the undo image t(m_CurrentImage - 1).
62          */
63         void UpdateUndoImage();
64         // ----------------------------------------------------------------------------------
65         /*! @fn void SetCurrentImage(VTKImageDataPointerType img);
66          * @brief This method sets the image to be manipulated.
67          */
68         void SetCurrentImage(VTKImageDataPointerType img);
69         // ----------------------------------------------------------------------------------
70         /*! @fn VTKImageDataPointerType GetImageRegion(const RegionSType& region,
71          VTKImageDataPointerType img);
72          * @brief This method extract from an image the region of interest (In the undo/redo returns the volume of the modified or t-1 image).
73          */
74         VTKImageDataPointerType GetImageRegion(const RegionSType& region,
75                         VTKImageDataPointerType img);
76 protected:
77         // ----------------------------------------------------------------------------------
78         /*! @fn virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
79          * @brief This method writes in the visualized image the changes of the undo/redo.
80          */
81         virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
82         // ----------------------------------------------------------------------------------
83 protected:
84
85         IDequeType* m_ImagesDeque; //!<The manager of the ImagesDeque.
86         VTKImageDataPointerType m_UndoImage; //!< This is the image for undo t(m_CurrentImage - 1).
87         VTKImageDataPointerType m_CurrentImage; //!< This is the current image (The modification image).
88
89 };
90
91 #endif /* IMAGEUNDOREDO_H_ */