]> Creatis software - clitk.git/blob - itk/clitkRelativePositionDataBaseAnalyzerFilter.h
Add first version of clitkRelativePositionDataBaseAnalyzer
[clitk.git] / itk / clitkRelativePositionDataBaseAnalyzerFilter.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 CLITKRELATIVEPOSITIONANALYZERFILTER_H
20 #define CLITKRELATIVEPOSITIONANALYZERFILTER_H
21
22 // clitk
23 #include "clitkFilterWithAnatomicalFeatureDatabaseManagement.h"
24 #include "clitkFilterBase.h"
25 #include "clitkRelativePositionDataBase.h"
26
27 namespace clitk {
28   
29   //--------------------------------------------------------------------
30   /*
31     Load a database of relative positions. Analyze it and provide
32     common relative position for each patient. 
33   */
34   //--------------------------------------------------------------------
35   
36   class RelativePositionDataBaseAnalyzerFilter:
37     public virtual clitk::FilterBase,
38     public clitk::FilterWithAnatomicalFeatureDatabaseManagement
39   {
40
41   public:
42     RelativePositionDataBaseAnalyzerFilter();
43     virtual ~RelativePositionDataBaseAnalyzerFilter() {}
44     
45     // Input
46     itkGetConstMacro(DatabaseFilename, std::string);
47     itkSetMacro(DatabaseFilename, std::string);
48     itkGetConstMacro(StationName, std::string);
49     itkSetMacro(StationName, std::string);
50     itkGetConstMacro(ObjectName, std::string);
51     itkSetMacro(ObjectName, std::string);
52     itkGetConstMacro(OutputFilename, std::string);
53     itkSetMacro(OutputFilename, std::string);
54     
55     // For debug
56     void PrintOptions();
57     
58     // Go !
59     virtual void Update();
60
61   protected:
62     std::string m_DatabaseFilename;
63     std::string m_StationName;
64     std::string m_ObjectName;
65     std::string m_OutputFilename;
66     clitk::RelativePositionDataBase db;
67
68     bool ComputeOptimalThreshold(RelativePositionDataBaseIndexType & index, double & threshold);
69
70   }; // end class
71   //--------------------------------------------------------------------
72
73 } // end namespace clitk
74 //--------------------------------------------------------------------
75
76 #include "clitkRelativePositionDataBaseAnalyzerFilter.txx"
77
78 #endif