]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageModificationManager.h
DFCH: ManualPaint + imageUndoRedo: Undo/Redo functionality its now working =) =)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageModificationManager.h
1 /*!
2  * @file        imageMManager.h
3  * @brief       This file contains the ImageMManager 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 IMAGEMANAGEMENT_H_
10 #define IMAGEMANAGEMENT_H_
11
12 #include <iostream>
13 #include <map>
14 #include <limits>
15
16 #include "regionStructUR.h"
17
18 /*! @class ImageMManager imageMManager.h "imageMManager.cxx"
19  *      @brief This class contains the modification manager of the undo/redo
20  *      @details This class contains the region and some information about the undo/redo
21  */
22 class ImageMManager {
23 public:
24         // ----------------------------------------------------------------------------------
25         /*! @fn ImageMManager();
26          * @brief This is the default constructor.
27          */
28         ImageMManager();
29         // ----------------------------------------------------------------------------------
30         /*! @fn ImageMManager(ImageMManager* manager);
31          * @brief This is the parameterized constructor.
32          */
33         ImageMManager(ImageMManager* manager);
34         // ----------------------------------------------------------------------------------
35         /*! @fn virtual ~ImageMManager();
36          * @brief This is the destructor.
37          */
38         virtual ~ImageMManager();
39         // ----------------------------------------------------------------------------------
40         /*! @fn void CleanModifiedRegion();
41          * @brief This method cleans the modification Region.
42          */
43         void CleanModifiedRegion();
44         // ----------------------------------------------------------------------------------
45         /*! @fn void AddModifiedPixel(const int& i, const int& j, const int& k);
46          * @brief This method adds the coordinates of the region modified.
47          */
48         void AddModifiedPixel(const int& i, const int& j, const int& k);
49         // ----------------------------------------------------------------------------------
50         /*! @fn bool ValidateRegion();
51          * @brief This method returns true if the region modified is valid.
52          * @return
53          */
54         bool ValidateRegion();
55         // ----------------------------------------------------------------------------------
56         /*! @fn RegionStructUR GetModifiedRegion();
57          * @brief This method returns the modification region.
58          * @return
59          */
60         RegionStructUR GetModifiedRegion();
61         // ----------------------------------------------------------------------------------
62 private:
63         // ----------------------------------------------------------------------------------
64         /*! @fn
65          * @brief This method make the calculation of the minimun and maximum of the region modified.
66          */
67         void CalculateMinMaxRegion(const int& i, const int& j, const int& k);
68         // ----------------------------------------------------------------------------------
69 private:
70         RegionStructUR m_RegionStruct; //!< This is the Region structure.
71         bool m_ValidRegion; //!< This is true if the region is valid.
72 };
73
74 #endif /* IMAGEMANAGEMENT_H_ */