]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.h
86a6473ab3da3876b0b93b45bb8f814dc08f5251
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / image3DDequeUR.h
1 /*!
2  * @file        image3DDequeUR.h
3  * @brief       This file contains the Image3DDequeUR 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 IMAGE3DDEQUEUR_H_
10 #define IMAGE3DDEQUEUR_H_
11
12 #include "imageDequeUR.h"
13 #include <ctime>
14
15 /*! @class Image3DDequeUR image3DDequeUR.h "image3DDequeUR.cxx"
16  *      @brief This class contains the management of the undo/redo deque - Concrete Class
17  *  @details This class derives from ImageDequeUR.
18  */
19 class Image3DDequeUR: public ImageDequeUR {
20 public:
21         //typedef definition
22         // ----------------------------------------------------------------------------------
23         /*!     @typedef std::deque<ImageInfoUR*> ImageInfoDeque;
24          *      @brief Defines the deque of ImageInfoUR for the undo/redo.
25          */
26         typedef std::deque<ImageInfoUR*> ImageInfoDeque;
27         // ----------------------------------------------------------------------------------
28 public:
29         // ----------------------------------------------------------------------------------
30         /*! @fn Image3DDequeUR();
31          * @brief This is the default constructor.
32          */
33         Image3DDequeUR();
34         // ----------------------------------------------------------------------------------
35         /*! @fn virtual ~Image3DDequeUR();
36          * @brief This is the destructor.
37          */
38         virtual ~Image3DDequeUR();
39         // ----------------------------------------------------------------------------------
40         /*! @fn virtual void AddImagesToURContainer(VTKImageDataPointerType imgUndo,
41          VTKImageDataPointerType imgRedo, ImageMManager* imMManager);
42          * @brief This method adds the images for undo and redo in a container
43          * @param imgUndo The undoImage cropped.
44          * @param imgRedo The redoImage cropped.
45          * @param imManager The image manager.
46          */
47         virtual void AddImagesToURContainer(VTKImageDataPointerType imgUndo,
48                         VTKImageDataPointerType imgRedo, ImageMManager* imMManager);
49         // ----------------------------------------------------------------------------------
50         /*! @fn virtual void CleanURContainerFromIndex(const int& index);
51          * @brief This method allows to clean the container from a given index.
52          * @param index The index.
53          */
54         virtual void CleanURContainerFromIndex(const int& index);
55         // ----------------------------------------------------------------------------------
56         /*! @fn virtual void ManageMemory();
57          * @brief This method cleans the memory.
58          * @details This method cleans the principal memory when the images are not in use.
59          */
60         virtual void ManageMemory();
61         // ----------------------------------------------------------------------------------
62         /*! @fn virtual ImageInfoUR* Undo();
63          * @brief This method is the undo action.
64          * @return
65          */
66         virtual ImageInfoUR* Undo();
67         // ----------------------------------------------------------------------------------
68         /*! @fn virtual ImageInfoUR* Redo();
69          * @brief This method is the redo action.
70          * @return
71          */
72         virtual ImageInfoUR* Redo();
73         // ----------------------------------------------------------------------------------
74         /*! @fn void SetGlobalPath(const StringType& globalPath);
75          * @brief This method sets the global path where the temporary files will be stored.
76          * @param globalPath The String with the path.
77          */
78         void SetGlobalPath(const StringType& globalPath);
79         // ----------------------------------------------------------------------------------
80         /*! @fn StringType GetGlobalPath();
81          * @brief This method returns a String with the global path.
82          * @return
83          */
84         StringType GetGlobalPath();
85         // ----------------------------------------------------------------------------------
86         /*! @fn StringType GetImageName(const int & pos);
87          * @brief This method returns a String with an image name which won't be repeated.
88          * @param pos The position of the container to manage a sequence.
89          * @return
90          */
91         StringType GetImageName(const int & pos);
92         // ----------------------------------------------------------------------------------
93         /*! @fn void CleanHardDisk();
94          * @brief This method cleans the hard disk of the temporary files.
95          */
96         void CleanHardDisk();
97         // ----------------------------------------------------------------------------------
98 protected:
99         ImageInfoDeque m_ImgURDeque; //!<This is the container of the images for undo and redo.
100         int m_CurrentURPos; //!<This is the index where is located the undo and redo state.
101         StringType m_GlobalPath; //!<This is the string with the global path.
102         StringType m_IDImages; //!<This is the string with the ID of the images (For the filenames).
103 };
104
105 #endif /* IMAGE3DDEQUEUR_H_ */