00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkSample.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:47 $ 00007 Version: $Revision: 1.17 $ 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 __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 00086 itkTypeMacro(Sample, Object); 00087 00089 typedef TMeasurementVector MeasurementVectorType ; 00090 00092 typedef typename TMeasurementVector::ValueType MeasurementType ; 00093 00095 typedef float FrequencyType ; 00096 00100 typedef unsigned long InstanceIdentifier ; 00101 00102 itkStaticConstMacro( MeasurementVectorSize, unsigned int, 00103 TMeasurementVector::Length ) ; 00104 00105 virtual unsigned int Size() const = 0 ; 00106 00108 virtual MeasurementVectorType GetMeasurementVector(const InstanceIdentifier &id) = 0 ; 00109 00111 virtual FrequencyType GetFrequency(const InstanceIdentifier &id) const = 0 ; 00112 00114 virtual FrequencyType GetTotalFrequency() const 00115 = 0 ; 00116 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&) ; //purposely not implemented 00129 void operator=(const Self&) ; //purposely not implemented 00130 } ; // end of class 00131 00132 } // end of namespace Statistics 00133 } // end of namespace itk 00134 00135 #endif