ITK  5.2.0
Insight Toolkit
itkMaximumRatioDecisionRule.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkMaximumRatioDecisionRule_h
19 #define itkMaximumRatioDecisionRule_h
20 
21 #include <vector>
22 #include "vnl/vnl_matrix.h"
23 
24 #include "itkNumericTraits.h"
25 #include "itkDecisionRule.h"
26 #include "ITKStatisticsExport.h"
27 
28 namespace itk
29 {
30 namespace Statistics
31 {
59 class ITKStatistics_EXPORT MaximumRatioDecisionRule : public DecisionRule
60 {
61 public:
62  ITK_DISALLOW_COPY_AND_MOVE(MaximumRatioDecisionRule);
63 
68 
71 
73  itkNewMacro(Self);
74 
77  using MembershipVectorType = Superclass::MembershipVectorType;
78 
80  using ClassIdentifierType = Superclass::ClassIdentifierType;
81 
84  using PriorProbabilityVectorType = std::vector<PriorProbabilityValueType>;
85  using PriorProbabilityVectorSizeType = PriorProbabilityVectorType::size_type;
86 
95  Evaluate(const MembershipVectorType & discriminantScores) const override;
96 
101  void
102  SetPriorProbabilities(const PriorProbabilityVectorType & p);
103 
105  itkGetConstReferenceMacro(PriorProbabilities, PriorProbabilityVectorType);
106 
107 protected:
109  ~MaximumRatioDecisionRule() override = default;
110  void
111  PrintSelf(std::ostream & os, Indent indent) const override;
112 
113 private:
115 
116 }; // end of class
117 } // namespace Statistics
118 } // namespace itk
119 #endif
itk::Statistics::MaximumRatioDecisionRule::PriorProbabilityValueType
MembershipValueType PriorProbabilityValueType
Definition: itkMaximumRatioDecisionRule.h:83
itk::Statistics::MaximumRatioDecisionRule::MembershipValueType
Superclass::MembershipValueType MembershipValueType
Definition: itkMaximumRatioDecisionRule.h:76
itk::Statistics::MaximumRatioDecisionRule
A decision rule that operates as a frequentist's approximation to Bayes rule.
Definition: itkMaximumRatioDecisionRule.h:59
itkDecisionRule.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Statistics::DecisionRule::MembershipValueType
double MembershipValueType
Definition: itkDecisionRule.h:63
itk::Statistics::MaximumRatioDecisionRule::PriorProbabilityVectorType
std::vector< PriorProbabilityValueType > PriorProbabilityVectorType
Definition: itkMaximumRatioDecisionRule.h:84
itk::Statistics::DecisionRule::ClassIdentifierType
MembershipVectorType::size_type ClassIdentifierType
Definition: itkDecisionRule.h:67
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::MaximumRatioDecisionRule::PriorProbabilityVectorSizeType
PriorProbabilityVectorType::size_type PriorProbabilityVectorSizeType
Definition: itkMaximumRatioDecisionRule.h:85
itk::Statistics::MaximumRatioDecisionRule::m_PriorProbabilities
PriorProbabilityVectorType m_PriorProbabilities
Definition: itkMaximumRatioDecisionRule.h:114
itk::Statistics::DecisionRule
Base class for decision rules that return a class label based on a set of discriminant scores.
Definition: itkDecisionRule.h:48
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkNumericTraits.h
itk::Statistics::DecisionRule::MembershipVectorType
std::vector< MembershipValueType > MembershipVectorType
Definition: itkDecisionRule.h:64