]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h
#3253 creaMaracasVisu Bug New Normal - manual paint refresh
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualPaint / FillFilter.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 _FILL_FILTER_H_
27 #define _FILL_FILTER_H_
28
29 #include "baseFilterManualPaint.h"
30
31
32 class FillFilter : public baseFilterManualPaint {
33 public:
34         FillFilter();
35         virtual ~FillFilter();
36
37     void                        Run();
38     void                        FillToolRecursive(int px,int py, int pz, long int ivi);
39
40     void                        SetToleranceFill(double tolerancefill);
41     void                        SetDistanceFill(int distancefill);
42     virtual void        SetImages(vtkImageData *image,vtkImageData *image2);
43
44 private:
45     double          _tolerancefill;
46     int             _distancefill;
47     double          _graylevelbasefill;
48
49     int             _pxfill;
50     int             _pyfill;
51     int             _pzfill;
52     double          _distbasefill;
53     double          _tmpDistfill;
54     double          _tmpiglfill;
55     double          _tmpiglfill2;
56     long int        _countRecursiveFill;
57     long int        _countRecursiveFillProblem;
58     vtkImageData    *_auxImageFill;
59 //EED01
60         unsigned char   *_ptrAuxImageFill;
61
62     bool            _usingAuxImageFill;
63     bool            _auxGrayLevelValidationFill;
64     long int        _countProgressingFill;
65     long int        _limitRecursionFill;
66
67
68     void                SetAuxImageFill(int px,int py, int pz,long int ivi);
69         int                     _maxXback;
70         int                     _maxYback;
71         int                     _maxZback;
72
73
74         int                     difX;
75         int                     difY;
76         int                     difZ;
77 protected:
78
79
80 //DEF_POINTER_IMAGE_VTK_CREA_definition( v_image , ss_image , p_image , st_image )              
81         double  v_image                 ;
82         int     ss_image                ;
83         char    *p_image                ;
84         int             st_image                ;
85
86 //macro not working ???    
87 //   DEF_POINTER_IMAGE_VTK_CREA_definition(v_image2,ss_image2,p_image2,st_image2)               
88         double  v_image2                ;
89         int     ss_image2               ;
90         char    *p_image2               ;
91         int             st_image2               ;
92
93
94
95
96 };
97
98
99 #endif // _FILL_FILTER_H_