]> Creatis software - clitk.git/blob - segmentation/clitkFilterWithAnatomicalFeatureDatabaseManagement.h
fd9ecc1e19606ad63d0296dc39b2411d45bada9d
[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://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 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     itkSetMacro(AFDBFilename, std::string);
46     itkGetConstMacro(AFDBFilename, std::string);
47     GGO_DefineOption(afdb, SetAFDBFilename, std::string);
48
49     void WriteAFDB();
50     void LoadAFDB();
51     AnatomicalFeatureDatabase * GetAFDB();
52
53   protected:
54     FilterWithAnatomicalFeatureDatabaseManagement();
55     virtual ~FilterWithAnatomicalFeatureDatabaseManagement() {}    
56     
57     std::string m_AFDBFilename;
58     clitk::AnatomicalFeatureDatabase * m_AFDB;
59
60   private:
61     FilterWithAnatomicalFeatureDatabaseManagement(const Self&); //purposely not implemented
62     void operator=(const Self&); //purposely not implemented
63     
64   }; // end class
65   //--------------------------------------------------------------------
66
67 } // end namespace clitk
68 //--------------------------------------------------------------------
69
70 #endif // CLITKFILTERWITHANATOMICALFEATUREDATABASEMANAGEMENT_H