ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkMaximumRatioDecisionRule_h 00019 #define __itkMaximumRatioDecisionRule_h 00020 00021 #include <vector> 00022 #include "vnl/vnl_matrix.h" 00023 00024 #include "itkNumericTraits.h" 00025 #include "itkDecisionRule.h" 00026 00027 namespace itk 00028 { 00029 namespace Statistics 00030 { 00057 class ITK_EXPORT MaximumRatioDecisionRule : public DecisionRule 00058 { 00059 public: 00061 typedef MaximumRatioDecisionRule Self; 00062 typedef DecisionRule Superclass; 00063 typedef SmartPointer< Self > Pointer; 00064 00066 itkTypeMacro(MaximumRatioDecisionRule, DecisionRule); 00067 00069 itkNewMacro(Self); 00070 00072 typedef Superclass::MembershipValueType MembershipValueType; 00073 typedef Superclass::MembershipVectorType MembershipVectorType; 00074 00076 typedef Superclass::ClassIdentifierType ClassIdentifierType; 00077 00079 typedef MembershipValueType PriorProbabilityValueType; 00080 typedef std::vector< PriorProbabilityValueType > PriorProbabilityVectorType; 00081 typedef PriorProbabilityVectorType::size_type PriorProbabilityVectorSizeType; 00082 00090 virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const; 00091 00096 void SetPriorProbabilities(const PriorProbabilityVectorType& p); 00097 00099 itkGetConstReferenceMacro(PriorProbabilities, PriorProbabilityVectorType); 00100 00101 protected: 00102 MaximumRatioDecisionRule(); 00103 virtual ~MaximumRatioDecisionRule() {} 00104 void PrintSelf(std::ostream & os, Indent indent) const; 00105 00106 private: 00107 MaximumRatioDecisionRule(const Self &); //purposely not implemented 00108 void operator=(const Self &); //purposely not implemented 00109 00110 PriorProbabilityVectorType m_PriorProbabilities; 00111 00112 }; // end of class 00113 } // end of Statistics namespace 00114 } // end of ITK namespace 00115 #endif 00116