2 * @file image3DDequeUR.h
3 * @brief This file contains the Image3DDequeUR class.
5 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
9 #ifndef IMAGE3DDEQUEUR_H_
10 #define IMAGE3DDEQUEUR_H_
12 #include "imageDequeUR.h"
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.
19 class Image3DDequeUR: public ImageDequeUR {
22 // ----------------------------------------------------------------------------------
23 /*! @typedef std::deque<ImageInfoUR*> ImageInfoDeque;
24 * @brief Defines the deque of ImageInfoUR for the undo/redo.
26 typedef std::deque<ImageInfoUR*> ImageInfoDeque;
27 // ----------------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------------
30 /*! @fn Image3DDequeUR();
31 * @brief This is the default constructor.
34 // ----------------------------------------------------------------------------------
35 /*! @fn virtual ~Image3DDequeUR();
36 * @brief This is the destructor.
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.
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.
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.
60 virtual void ManageMemory();
61 // ----------------------------------------------------------------------------------
62 /*! @fn virtual ImageInfoUR* Undo();
63 * @brief This method is the undo action.
66 virtual ImageInfoUR* Undo();
67 // ----------------------------------------------------------------------------------
68 /*! @fn virtual ImageInfoUR* Redo();
69 * @brief This method is the redo action.
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.
78 void SetGlobalPath(const StringType& globalPath);
79 // ----------------------------------------------------------------------------------
80 /*! @fn StringType GetGlobalPath();
81 * @brief This method returns a String with the global path.
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.
91 StringType GetImageName(const int & pos);
92 // ----------------------------------------------------------------------------------
93 /*! @fn void CleanHardDisk();
94 * @brief This method cleans the hard disk of the temporary files.
97 // ----------------------------------------------------------------------------------
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).
105 #endif /* IMAGE3DDEQUEUR_H_ */