]> Creatis software - clitk.git/blob - segmentation/clitkFilterWithAnatomicalFeatureDatabaseManagement.h
itk4 migration
[clitk.git] / segmentation / clitkFilterWithAnatomicalFeatureDatabaseManagement.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://www.centreleonberard.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 CLITKFILTERWITHANATOMICALFEATUREDATABASEMANAGEMENT_H
20 #define CLITKFILTERWITHANATOMICALFEATUREDATABASEMANAGEMENT_H
21
22 // clitk
23 #include "clitkAnatomicalFeatureDatabase.h"
24 #include "clitkFilterBase.h"
25
26 namespace clitk {
27   
28   //--------------------------------------------------------------------
29   /*
30     - Convenient class to add AFDB capabilities to a filter 
31     - "virtual" inheritance is needed to avoir ambiguous inherited
32     functions
33   */
34   //--------------------------------------------------------------------
35   class FilterWithAnatomicalFeatureDatabaseManagement: public virtual FilterBase
36   {
37   public:
38     // Standard class typedefs
39     typedef FilterWithAnatomicalFeatureDatabaseManagement Self;
40     
41     // Run-time type information (and related methods)
42     itkTypeMacro(FilterWithAnatomicalFeatureDatabaseManagement, Object);
43
44     // Set/Get filename 
45     // itkBooleanMacro(AFDBFilenameGivenFlag);
46     // itkSetMacro(AFDBFilenameGivenFlag, bool);
47     // itkGetConstMacro(AFDBFilenameGivenFlag, bool);
48     // GGO_DefineOption_Flag(afdb, SetAFDBFilenameGivenFlag);
49
50     // itkBooleanMacro(AFDBPathGivenFlag);
51     // itkSetMacro(AFDBPathGivenFlag, bool);
52     // itkGetConstMacro(AFDBPathGivenFlag, bool);
53     // GGO_DefineOption_Flag(afdb_path, SetAFDBPathGivenFlag);
54
55     itkSetMacro(AFDBFilename, std::string);
56     itkGetConstMacro(AFDBFilename, std::string);
57     // GGO_DefineOption_WithTest(afdb, SetAFDBFilename, std::string, AFDBFilenameGivenFlag);
58
59     itkSetMacro(AFDBPath, std::string);
60     itkGetConstMacro(AFDBPath, std::string);
61     // GGO_DefineOption_WithTest(afdb_path, SetAFDBPath, std::string, AFDBPathGivenFlag);
62
63     void WriteAFDB();
64     void LoadAFDB();
65
66     AnatomicalFeatureDatabase::Pointer GetAFDB();
67     void SetAFDB(AnatomicalFeatureDatabase * a) { m_AFDB = a; }
68
69   protected:
70     FilterWithAnatomicalFeatureDatabaseManagement();
71     virtual ~FilterWithAnatomicalFeatureDatabaseManagement() {}    
72     
73     std::string m_AFDBFilename;
74     // bool m_AFDBFilenameGivenFlag;
75     std::string m_AFDBPath;
76     // bool m_AFDBPathGivenFlag;
77     clitk::AnatomicalFeatureDatabase::Pointer m_AFDB;
78
79   private:
80     FilterWithAnatomicalFeatureDatabaseManagement(const Self&); //purposely not implemented
81     void operator=(const Self&); //purposely not implemented
82     
83   }; // end class
84   //--------------------------------------------------------------------
85
86 } // end namespace clitk
87 //--------------------------------------------------------------------
88
89 #endif // CLITKFILTERWITHANATOMICALFEATUREDATABASEMANAGEMENT_H