00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSample_h
00018 #define __itkSample_h
00019
00020 #include <vector>
00021
00022 #include "itkMacro.h"
00023 #include "itkPoint.h"
00024 #include "itkSize.h"
00025 #include "itkObject.h"
00026 #include "itkFixedArray.h"
00027
00028 namespace itk{
00029 namespace Statistics{
00030
00076 template < class TMeasurementVector >
00077 class ITK_EXPORT Sample : public Object
00078 {
00079 public:
00081 typedef Sample Self;
00082 typedef Object Superclass ;
00083 typedef SmartPointer< Self > Pointer ;
00084 typedef SmartPointer<const Self> ConstPointer;
00085
00087 itkTypeMacro(Sample, Object);
00088
00090 typedef TMeasurementVector MeasurementVectorType ;
00091
00093 typedef typename TMeasurementVector::ValueType MeasurementType ;
00094
00096 typedef float FrequencyType ;
00097
00101 typedef unsigned long InstanceIdentifier ;
00102
00103 itkStaticConstMacro( MeasurementVectorSize, unsigned int,
00104 TMeasurementVector::Length ) ;
00105
00106 virtual unsigned int Size() const = 0 ;
00107
00109 virtual const MeasurementVectorType & GetMeasurementVector(const InstanceIdentifier &id) const = 0 ;
00110
00112 virtual FrequencyType GetFrequency(const InstanceIdentifier &id) const = 0 ;
00113
00115 virtual FrequencyType GetTotalFrequency() const
00116 = 0 ;
00117
00118
00119 protected:
00120 Sample() {}
00121 virtual ~Sample() {}
00122 void PrintSelf(std::ostream& os, Indent indent) const
00123 {
00124 Superclass::PrintSelf(os,indent);
00125 }
00126
00127
00128 private:
00129 Sample(const Self&) ;
00130 void operator=(const Self&) ;
00131 } ;
00132
00133 }
00134 }
00135
00136 #endif