]> Creatis software - clitk.git/blob - common/clitkLabelizeParameters.h
8f7c1264478ce1e72101a601e5e32a202c040ec2
[clitk.git] / common / clitkLabelizeParameters.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17   ======================================================================-====*/
18
19 #ifndef CLITKLABELIZEPARAMETERS_H
20 #define CLITKLABELIZEPARAMETERS_H
21
22 // clitk
23 //#include "clitkCommon.h"
24
25 // itk
26 #include "itkObject.h"
27
28 namespace clitk {
29   
30   //--------------------------------------------------------------------
31   template<class PixelType>
32   class LabelizeParameters: public itk::Object {
33   public:
34     typedef LabelizeParameters<PixelType> Self;
35     LabelizeParameters() { UseLastKeepOff(); }
36     itkSetMacro(FirstKeep, PixelType);
37     itkGetMacro(FirstKeep, PixelType);
38     itkSetMacro(LastKeep, PixelType);
39     itkGetMacro(LastKeep, PixelType);
40     itkSetMacro(UseLastKeep, bool);
41     itkGetConstMacro(UseLastKeep, bool);
42     itkBooleanMacro(UseLastKeep);
43     void AddLabelToRemove(PixelType l) { m_LabelsToRemove.push_back(l); }
44     //    itkGetMacro(LabelsToRemove, std::vector<PixelType> &);
45     std::vector<PixelType> & GetLabelsToRemove() { return m_LabelsToRemove; }
46     
47   protected:
48     std::vector<PixelType> m_LabelsToRemove;
49     PixelType m_FirstKeep;
50     PixelType m_LastKeep;
51     bool m_UseLastKeep; 
52   };
53   //--------------------------------------------------------------------
54
55
56 } // end namespace clitk
57 //--------------------------------------------------------------------
58
59 #endif // CLITKLABELIZEPARAMETERS_H