]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageDequeUR.h
DFCH: ManualPaint + imageUndoRedo: Undo/Redo functionality its now working =) =)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageDequeUR.h
1 /*!
2  * @file        imageDequeUR.h
3  * @brief       This file contains the Image3DDequeUR 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 IMAGEDEQUE_H_
10 #define IMAGEDEQUE_H_
11
12 #include <iostream>
13 #include <string>
14 #include <deque>
15 #include <vtkImageData.h>
16 #include <vtkSmartPointer.h>
17 #include "imageInfoUR.h"
18 #include "imageModificationManager.h"
19
20 /*! @class ImageDequeUR imageDequeUR.h "imageDequeUR.cxx"
21  *      @brief This class contains the management of the undo/redo - Abstract Class
22  */
23 class ImageDequeUR {
24 public:
25         //typedef definition
26         // ----------------------------------------------------------------------------------
27         /*!     @typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
28          *      @brief Defines the pointer of vtkImageDate type.
29          */
30         typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
31         // ----------------------------------------------------------------------------------
32         /*!     @typedef std::string StringType;
33          *      @brief Redefinition of the string type.
34          */
35         typedef std::string StringType;
36         // ----------------------------------------------------------------------------------
37         /*!     @typedef ImageMManager ImageMManagerType;
38          *      @brief Definition of the ImageMManager type.
39          */
40         typedef ImageMManager ImageMManagerType;
41         // ----------------------------------------------------------------------------------
42 public:
43         // ----------------------------------------------------------------------------------
44         /*! @fn ImageDequeUR();
45          * @brief This is the default constructor.
46          */
47         ImageDequeUR();
48         // ----------------------------------------------------------------------------------
49         /*! @fn virtual ~ImageDequeUR();
50          * @brief This is the destructor.
51          */
52         virtual ~ImageDequeUR();
53         // ----------------------------------------------------------------------------------
54         /*! @fn virtual void AddImagesToURContainer(VTKImageDataPointerType imgUndo,
55          VTKImageDataPointerType imgRedo, ImageMManager* imMManager);
56          * @brief This method adds the images for undo and redo in a container
57          * @param imgUndo The undoImage cropped.
58          * @param imgRedo The redoImage cropped.
59          * @param imManager The image manager.
60          */
61         virtual void AddImagesToURContainer(VTKImageDataPointerType imgUndo,
62                         VTKImageDataPointerType imgRedo, ImageMManager* imMManager);
63         // ----------------------------------------------------------------------------------
64         /*! @fn virtual void CleanURContainerFromIndex(const int& index);
65          * @brief This method allows to clean the container from a given index.
66          * @param index The index.
67          */
68         virtual void CleanURContainerFromIndex(const int& index);
69         // ----------------------------------------------------------------------------------
70         /*! @fn virtual void ManageMemory();
71          * @brief This method cleans the memory.
72          * @details This method cleans the principal memory when the images are not in use.
73          */
74         virtual void ManageMemory();
75         // ----------------------------------------------------------------------------------
76         /*! @fn virtual ImageInfoUR* Undo();
77          * @brief This method is the undo action.
78          * @return
79          */
80         virtual ImageInfoUR* Undo();
81         // ----------------------------------------------------------------------------------
82         /*! @fn virtual ImageInfoUR* Redo();
83          * @brief This method is the redo action.
84          * @return
85          */
86         virtual ImageInfoUR* Redo();
87         // ----------------------------------------------------------------------------------
88         /*! @fn void SetGlobalPath(const StringType& globalPath);
89          * @brief This method sets the global path where the temporary files will be stored.
90          * @param globalPath The String with the path.
91          */
92 };
93
94 #endif /* IMAGEDEQUE_H_ */