Orfeo Toolbox  3.16
itkClassifierBase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkClassifierBase.h,v $
5  Language: C++
6  Date: $Date: 2008-10-23 16:15:23 $
7  Version: $Revision: 1.12 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkClassifierBase_h
18 #define __itkClassifierBase_h
19 
20 #include "itkLightProcessObject.h"
22 #include "itkDecisionRuleBase.h"
23 
24 #include <vector>
25 
26 namespace itk
27 {
28 
85 template <class TDataContainer>
87 {
88 public:
92 
94  itkTypeMacro(ClassifierBase,LightProcessObject);
95 
97  itkSetMacro(NumberOfClasses, unsigned int);
98 
100  itkGetConstReferenceMacro(NumberOfClasses, unsigned int);
101 
103  typedef typename TDataContainer::ValueType MeasurementVectorType;
104 
109 
110  typedef std::vector< MembershipFunctionPointer >
112 
115 
119  void SetDecisionRule( DecisionRuleType* ptrToDecisionRule )
120  {
121  m_DecisionRule = ptrToDecisionRule;
122  }
123 
125  DecisionRuleType* GetDecisionRule(void)
126  {
127  return m_DecisionRule.GetPointer();
128  }
129 
134  const MembershipFunctionType* GetMembershipFunction(unsigned int index)const
135  {
136  return m_MembershipFunctions[index].GetPointer();
137  }
138 
140  unsigned int GetNumberOfMembershipFunctions()
141  {
142  return static_cast<unsigned int>( m_MembershipFunctions.size() );
143  }
144 
146  unsigned int AddMembershipFunction(MembershipFunctionType* function);
147 
149  void Update();
150 
151 protected:
152  ClassifierBase();
153  ~ClassifierBase();
154  void PrintSelf(std::ostream& os, Indent indent) const;
155 
158  virtual void GenerateData() = 0;
159 
160 private:
161  ClassifierBase(const Self&); //purposely not implemented
162  void operator=(const Self&); //purposely not implemented
163 
165  unsigned int m_NumberOfClasses;
166 
169 
172 
173 }; // class Classifier
174 
175 
176 } // namespace itk
177 
178 #ifndef ITK_MANUAL_INSTANTIATION
179 #include "itkClassifierBase.txx"
180 #endif
181 
182 #endif

Generated at Sat Jun 15 2013 23:33:22 for Orfeo Toolbox with doxygen 1.8.3.1