]> Creatis software - clitk.git/blob - segmentation/clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
add anatomical feature DB capability to a filter
[clitk.git] / segmentation / clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
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 // clitk
20 #include "clitkFilterWithAnatomicalFeatureDatabaseManagement.h"
21
22 //--------------------------------------------------------------------
23 clitk::FilterWithAnatomicalFeatureDatabaseManagement::
24 FilterWithAnatomicalFeatureDatabaseManagement() 
25 {
26   m_AFDB = NULL; 
27   SetAFDBFilename("noname.afdb");
28 }
29 //--------------------------------------------------------------------
30
31
32 //--------------------------------------------------------------------
33 void clitk::FilterWithAnatomicalFeatureDatabaseManagement::WriteAFDB() 
34 {
35   GetAFDB()->SetFilename(GetAFDBFilename());
36   GetAFDB()->Write();
37 }
38 //--------------------------------------------------------------------
39
40     
41 //--------------------------------------------------------------------
42 void clitk::FilterWithAnatomicalFeatureDatabaseManagement::LoadAFDB() 
43 {
44   GetAFDB()->SetFilename(GetAFDBFilename());
45   GetAFDB()->Load();
46 }
47 //--------------------------------------------------------------------
48
49
50 //--------------------------------------------------------------------
51 clitk::AnatomicalFeatureDatabase * clitk::FilterWithAnatomicalFeatureDatabaseManagement::GetAFDB() 
52 {
53   if (m_AFDB == NULL) {
54     m_AFDB = new clitk::AnatomicalFeatureDatabase;
55   }
56   return m_AFDB;
57 }
58 //--------------------------------------------------------------------