2 * @file imageUndoRedo.h
3 * @brief This file contains the ImageUndoRedo class.
5 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
9 #ifndef IMAGEUNDOREDO_H_
10 #define IMAGEUNDOREDO_H_
12 #include "managerUR.h"
14 /*! @class ImageUndoRedo imageUndoRedo.h "imageUndoRedo.cxx"
15 * @brief This class manages the undo/redo -- Concrete Class
16 * @details This class derives from ManagerUR
18 class ImageUndoRedo: public ManagerUR {
22 // ----------------------------------------------------------------------------------
23 /*! @typedef typedef Image3DDequeUR IDequeType;
24 * @brief Redefines the Image3DDequeUR type
26 typedef Image3DDequeUR IDequeType;
27 // ----------------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------------
30 /*! @fn ImageUndoRedo();
31 * @brief This is the default constructor.
34 // ----------------------------------------------------------------------------------
35 /*! @fn virtual ~ImageUndoRedo();
36 * @brief This is the destructor.
38 virtual ~ImageUndoRedo();
39 // ----------------------------------------------------------------------------------
40 /*! @fn virtual void Undo();
41 * @brief This method manages the undo action.
44 // ----------------------------------------------------------------------------------
45 /*! @fn virtual void Redo();
46 * @brief This method manages the redo action.
49 // ----------------------------------------------------------------------------------
50 /*! @fn virtual void SetImage(VTKImageDataPointerType image);
51 * @brief This method sets the modification image (The image which will be modified an manipulated)
53 virtual void SetImage(VTKImageDataPointerType image);
54 // ----------------------------------------------------------------------------------
55 /*! @fn virtual void SetURImages(ImageMManagerType* imMManager);
56 * @brief This methods adds a new image Undo/Redo.
58 virtual void SetURImages(ImageMManagerType* imMManager);
59 // ----------------------------------------------------------------------------------
60 /*! @fn void UpdateUndoImage();
61 * @brief This method updates the undo image t(m_CurrentImage - 1).
63 void UpdateUndoImage();
64 // ----------------------------------------------------------------------------------
65 /*! @fn void SetCurrentImage(VTKImageDataPointerType img);
66 * @brief This method sets the image to be manipulated.
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).
74 VTKImageDataPointerType GetImageRegion(const RegionSType& region,
75 VTKImageDataPointerType img);
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.
81 virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
82 // ----------------------------------------------------------------------------------
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).
91 #endif /* IMAGEUNDOREDO_H_ */