]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/managerUR.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / managerUR.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 /*!
27  * @file        managerUR.h
28  * @brief       This file contains the ManagerUR class. -- Abstract class
29  * @author      Info-Dev
30  * @author      Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
31  * @date        2011-11-15
32  */
33
34 #ifndef MANAGERUR_H_
35 #define MANAGERUR_H_
36
37 #include <iostream>
38 #include <string>
39 #include <vtkImageData.h>
40 #include <vtkSmartPointer.h>
41 #include <vtkExtractVOI.h>
42
43 #include "image3DDequeUR.h"
44 #include "imageModificationManager.h"
45 #include "regionStructUR.h"
46 #include "imageInfoUR.h"
47
48 /*! @class ManagerUR managerUR.h "managerUR.cxx"
49  *      @brief This class manages the Undo/Redo -- Abstract Class.
50  *      @details This class allows the communication between others libraries who wants to use it.
51  */
52 class ManagerUR {
53 public:
54         //typedef definition
55         // ----------------------------------------------------------------------------------
56         /*!     @typedef RegionStructUR RegionSType;
57          *      @brief Redefines the ImageMManagerType.
58          */
59         typedef RegionStructUR RegionSType;
60         // ----------------------------------------------------------------------------------
61         /*!     @typedef ImageMManager ImageMManagerType;
62          *      @brief Redefines the ImageMManager type.
63          */
64         typedef ImageMManager ImageMManagerType;
65         // ----------------------------------------------------------------------------------
66         /*!     @typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
67          *      @brief Defines the pointer of vtkImageDate type.
68          */
69         typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
70         // ----------------------------------------------------------------------------------
71         /*!     @typedef vtkSmartPointer<vtkExtractVOI> VTKExtractVOIPointerType;
72          *      @brief Defines the pointer of vtkExtractVOI type.
73          */
74         typedef vtkSmartPointer<vtkExtractVOI> VTKExtractVOIPointerType;
75         // ----------------------------------------------------------------------------------
76         /*!     @typedef std::string StringType;
77          *      @brief Redefinition of the string type
78          */
79         typedef std::string StringType;
80         // ----------------------------------------------------------------------------------
81 public:
82         // ----------------------------------------------------------------------------------
83         /*! @fn ManagerUR();
84          * @brief This is the default constructor.
85          */
86         ManagerUR();
87         // ----------------------------------------------------------------------------------
88         /*! @fn virtual ~ManagerUR();
89          * @brief This is the destructor.
90          */
91         virtual ~ManagerUR();
92         // ----------------------------------------------------------------------------------
93         /*! @fn virtual void Undo();
94          * @brief This method manages the undo action.
95          */
96         virtual void Undo();
97         // ----------------------------------------------------------------------------------
98         /*! @fn virtual void Redo();
99          * @brief This method manages the redo action.
100          */
101         virtual void Redo();
102         // ----------------------------------------------------------------------------------
103         /*! @fn virtual void SetImage(VTKImageDataPointerType image);
104          * @brief This method sets the modification image (The image which will be modified an manipulated)
105          */
106         virtual void SetImage(VTKImageDataPointerType image);
107         // ----------------------------------------------------------------------------------
108         /*! @fn virtual void SetURImages(ImageMManagerType* imMManager);
109          * @brief This methods adds a new image Undo/Redo.
110          */
111         virtual void SetURImages(ImageMManagerType* imMManager);
112         // ----------------------------------------------------------------------------------
113 protected:
114         // ----------------------------------------------------------------------------------
115         /*! @fn virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
116          * @brief This method writes in the visualized image the changes of the undo/redo.
117          */
118         virtual void DrawUR(ImageInfoUR* imageInfo, const bool& undo);
119         // ----------------------------------------------------------------------------------
120 };
121
122 #endif /* MANAGERUR_H_ */