]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/baseFilterManualPaint.h
32319a5a3eee1e3caa981125306278dca511f920
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualPaint / baseFilterManualPaint.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 #ifndef _BASE_FILTER_MANUAL_PAINT_H_
27 #define _BASE_FILTER_MANUAL_PAINT_H_
28
29 #include <vtkImageData.h>
30
31 //#include "regionStructUR.h"
32
33 #include "imageModificationManager.h"
34
35
36 class baseFilterManualPaint {
37
38 public:
39         baseFilterManualPaint();
40         virtual ~baseFilterManualPaint();
41
42         virtual void SetImage(vtkImageData *image);
43         void SetPoint(int px, int py, int pz);
44         void Set2D3D(int dim2D3D);
45         void SetGrayLevel(double graylevel);
46         void SetDirection(int direction);
47         void ResetGeneralMinMax();
48         void SetGeneralMinMax(int minX, int maxX, int minY, int maxY, int minZ,
49                         int maxZ);
50         void GetScalarRange(double * range);
51         ImageMManager* GetImageMManager(); //DFCH
52         void CleanImageMManager(); //DFCH
53         virtual void Run();
54
55 private:
56
57 protected:
58         ImageMManager *_IMManager; //Saves the last modified region (MinX, MaxX, MinY, MaxY, MinZ, MaxZ).
59         vtkImageData *_image;
60         int _direction;
61         int _px; // start point of the brush
62         int _py;
63         int _pz;
64         int _pMinX; // General min max of many brush actions
65         int _pMinY;
66         int _pMinZ;
67         int _pMaxX;
68         int _pMaxY;
69         int _pMaxZ;
70         int _minX; // min max of the image
71         int _maxX;
72         int _minY;
73         int _maxY;
74         int _minZ;
75         int _maxZ;
76         bool _2D3D;
77         double _graylevel;
78 };
79
80 #endif // _BASE_FILTER_MANUAL_PAINT_H_