Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSampleClassifier.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkSampleClassifier.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:47 $ 00007 Version: $Revision: 1.13 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkSampleClassifier_h 00018 #define __itkSampleClassifier_h 00019 00020 #include <vector> 00021 00022 #include "itkObject.h" 00023 #include "itkExceptionObject.h" 00024 #include "itkSubsample.h" 00025 #include "itkMembershipSample.h" 00026 #include "itkClassifierBase.h" 00027 00028 namespace itk{ 00029 namespace Statistics{ 00030 00065 template< class TSample > 00066 class ITK_EXPORT SampleClassifier : 00067 public ClassifierBase< TSample > 00068 { 00069 public: 00071 typedef SampleClassifier Self; 00072 typedef ClassifierBase< TSample > Superclass; 00073 typedef SmartPointer< Self > Pointer; 00074 00076 itkTypeMacro(SampleClassifier, Object); 00077 itkNewMacro(Self) ; 00078 00080 typedef MembershipSample< TSample > OutputType ; 00081 00083 typedef typename TSample::MeasurementType MeasurementType ; 00084 typedef typename TSample::MeasurementVectorType MeasurementVectorType ; 00085 00086 itkStaticConstMacro(MeasurementVectorSize, unsigned int, 00087 TSample::MeasurementVectorSize); 00088 00090 typedef typename Superclass::MembershipFunctionPointerVector 00091 MembershipFunctionPointerVector ; 00092 00093 typedef unsigned int ClassLabelType ; 00094 typedef std::vector< ClassLabelType > ClassLabelVectorType ; 00096 void SetSample(TSample* sample) ; 00097 00099 TSample* GetSample() ; 00100 00106 void SetMembershipFunctionClassLabels( ClassLabelVectorType& labels) ; 00107 00109 ClassLabelVectorType& GetMembershipFunctionClassLabels() 00110 { return m_ClassLabels ; } 00111 00113 OutputType* GetOutput() ; 00114 00115 protected: 00116 SampleClassifier() ; 00117 virtual ~SampleClassifier() {} 00118 void PrintSelf(std::ostream& os, Indent indent) const; 00119 00121 void GenerateData() ; 00122 00123 private: 00125 TSample* m_Sample ; 00126 00128 typename OutputType::Pointer m_Output ; 00129 00131 ClassLabelVectorType m_ClassLabels ; 00132 } ; // end of class 00133 00134 00135 } // end of namespace Statistics 00136 } // end of namespace itk 00137 00138 00139 #ifndef ITK_MANUAL_INSTANTIATION 00140 #include "itkSampleClassifier.txx" 00141 #endif 00142 00143 #endif 00144 00145 00146 00147 00148 00149 00150

Generated at Sat Mar 31 02:28:10 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000