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

itkSample.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSample.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/16 18:06:14 $
00007   Version:   $Revision: 1.12 $
00008 
00009   Copyright (c) 2002 Insight 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 "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&) ; //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

Generated at Fri May 21 01:15:16 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000