00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkSampleAlgorithmBase_h
00019 #define __itkSampleAlgorithmBase_h
00020
00021 #include <vnl/vnl_vector.h>
00022 #include <vnl/vnl_matrix.h>
00023
00024 #include "itkMacro.h"
00025 #include "itkObjectFactory.h"
00026 #include "itkObject.h"
00027
00028 namespace itk{
00029 namespace Statistics{
00030
00043 template< class TInputSample >
00044 class ITK_EXPORT SampleAlgorithmBase : public Object
00045 {
00046 public:
00048 typedef SampleAlgorithmBase Self;
00049 typedef Object Superclass ;
00050 typedef SmartPointer< Self > Pointer;
00051 typedef SmartPointer< const Self > ConstPointer;
00052
00054 itkTypeMacro(SampleAlgorithmBase, Object);
00055 itkNewMacro(Self) ;
00056
00058 typedef TInputSample InputSampleType ;
00059
00061 void SetInputSample( const TInputSample * sample )
00062 {
00063 if ( m_InputSample != sample )
00064 {
00065 m_InputSample = sample ;
00066 this->Modified() ;
00067 }
00068 }
00069
00070 const TInputSample * GetInputSample() const
00071 { return m_InputSample.GetPointer() ; }
00072
00076 void Update()
00077 { this->GenerateData() ; }
00078
00079 protected:
00080 SampleAlgorithmBase() ;
00081 virtual ~SampleAlgorithmBase() {}
00082 void PrintSelf(std::ostream& os, Indent indent) const;
00083
00085 virtual void GenerateData() ;
00086
00087 private:
00089 typename TInputSample::ConstPointer m_InputSample ;
00090 } ;
00091
00092 }
00093 }
00094
00095 #ifndef ITK_MANUAL_INSTANTIATION
00096 #include "itkSampleAlgorithmBase.txx"
00097 #endif
00098
00099 #endif
00100