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 "itkMacro.h"
00021 #include "itkPoint.h"
00022 #include "itkSize.h"
00023 #include "itkObject.h"
00024 #include "itkFixedArray.h"
00025
00026 namespace itk{
00027 namespace Statistics{
00028
00074 template < class TMeasurementVector >
00075 class ITK_EXPORT Sample : public Object
00076 {
00077 public:
00079 typedef Sample Self;
00080 typedef Object Superclass ;
00081 typedef SmartPointer< Self > Pointer ;
00082
00084 itkTypeMacro(Sample, Object);
00085
00087 typedef TMeasurementVector MeasurementVectorType ;
00088
00090 typedef typename TMeasurementVector::ValueType MeasurementType ;
00091
00093 itkStaticConstMacro(MeasurementVectorSize, unsigned int,
00094 TMeasurementVector::Length);
00095
00097 typedef float FrequencyType ;
00098
00102 typedef unsigned long InstanceIdentifier ;
00103
00104 virtual unsigned int Size() const = 0 ;
00105 virtual unsigned int Size(const unsigned int &dimension) const = 0 ;
00106 virtual unsigned int GetNumberOfInstances() const = 0 ;
00107
00109 virtual MeasurementVectorType& GetMeasurementVector(const InstanceIdentifier &id) = 0 ;
00110
00112 virtual FrequencyType GetFrequency(const InstanceIdentifier &id) const = 0 ;
00113
00115 virtual FrequencyType GetTotalFrequency(const unsigned int &dimension) const
00116 = 0 ;
00117
00118 protected:
00119 Sample() {}
00120 virtual ~Sample() {}
00121 void PrintSelf(std::ostream& os, Indent indent) const
00122 {
00123 Superclass::PrintSelf(os,indent);
00124 }
00125
00126
00127 private:
00128 Sample(const Self&) ;
00129 void operator=(const Self&) ;
00130 } ;
00131
00132 }
00133 }
00134
00135 #endif