ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMaximumRatioDecisionRule.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
58 class ITKStatistics_EXPORT MaximumRatioDecisionRule : public DecisionRule
59 {
60 public:
61  ITK_DISALLOW_COPY_AND_ASSIGN(MaximumRatioDecisionRule);
62 
67 
70 
72  itkNewMacro(Self);
73 
76  using MembershipVectorType = Superclass::MembershipVectorType;
77 
79  using ClassIdentifierType = Superclass::ClassIdentifierType;
80 
83  using PriorProbabilityVectorType = std::vector< PriorProbabilityValueType >;
84  using PriorProbabilityVectorSizeType = PriorProbabilityVectorType::size_type;
85 
93  ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const override;
94 
99  void SetPriorProbabilities(const PriorProbabilityVectorType& p);
100 
102  itkGetConstReferenceMacro(PriorProbabilities, PriorProbabilityVectorType);
103 
104 protected:
106  ~MaximumRatioDecisionRule() override = default;
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
109 private:
111 
112 }; // end of class
113 } // end of Statistics namespace
114 } // end of ITK namespace
115 #endif
Superclass::MembershipValueType MembershipValueType
Light weight base class for most itk classes.
std::vector< PriorProbabilityValueType > PriorProbabilityVectorType
PriorProbabilityVectorType::size_type PriorProbabilityVectorSizeType
Base class for decision rules that return a class label based on a set of discriminant scores...
std::vector< MembershipValueType > MembershipVectorType
A decision rule that operates as a frequentist&#39;s approximation to Bayes rule.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
MembershipVectorType::size_type ClassIdentifierType