KWStyle - itkDecisionRuleBase.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkDecisionRuleBase.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:34 $
7   Version:   $Revision: 1.4 $
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 __itkDecisionRuleBase_h
18 #define __itkDecisionRuleBase_h
19
20 #include <vector>
21 #include "vnl/vnl_matrix.h"
22 #include "itkObject.h"
23 #include "itkObjectFactory.h"
24 #include "itkArray.h"
25 #include "itkVariableLengthVector.h"
26
27 namespace itk
28 {
29
30 /** \class DecisionRuleBase
31  *  \brief Base class that allows the setting of usage of differnt
32  *  decision rules used in classification
33  *  This class has the pure virtual function, Evaluate(). Therefore,
34  *  any subclass should implement the function to be instantiated.
35  */
36  
37 class ITKCommon_EXPORT DecisionRuleBase : public Object
38 {
39 public:
40   /** Standard class typedefs */ 
41 SEM   typedef DecisionRuleBase Self ;
42 TDA   typedef Object Superclass;
43 TDA   typedef SmartPointer<Self> Pointer;
44 TDA   typedef SmartPointer<const Self> ConstPointer;
45   
46   /** Run-time type information (and related methods) */
47   itkTypeMacro(DecisionRuleBase, Object);
48   
49   /** Types for the arguments that are acceptable in the Evaluate() method */
50   typedef std::vector< double >            VectorType;
51   typedef Array< double >                  ArrayType;
52   typedef VariableLengthVector< double >   VariableLengthVectorType;
53     
54   /** The return value of this function is a class label.
55    * Basically, using its internal logic based on the discriminant
56    * scores, this function decides best class label and return it.
57    */
58 LEN   virtual unsigned int Evaluate( const VectorType &discriminantScores) const = 0;
59
60   /** The return value of this function is a class label.
61    * Basically, using its internal logic based on the discriminant
62    * scores, this function decides best class label and return it.
63    */
64   virtual unsigned int Evaluate( const ArrayType &discriminantScores) const = 0;
65
66
67 protected:
68   DecisionRuleBase();
69   virtual ~DecisionRuleBase();
70   void PrintSelf(std::ostream& os, Indent indent) const;
71   
72 private:
73   
74 SEM } ; // end of class
75
76 // namespace itk
77
78 #endif
79
80 EOF
81 EOF,EML
82 EOF,EML
83 EOF,EML
84 EOF,EML
85 EOF,EML
86 EOF,EML

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:05PM
© Kitware Inc.