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

itkSampleAlgorithmBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSampleAlgorithmBase.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/16 18:45:15 $
00007   Version:   $Revision: 1.2 $
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 
00018 #ifndef __itkSampleAlgorithmBase_h
00019 #define __itkSampleAlgorithmBase_h
00020 
00021 #include <vnl/vnl_vector.h>
00022 #include <vnl/vnl_matrix.h>
00023 
00024 #include "itkObject.h"
00025 
00026 namespace itk{ 
00027   namespace Statistics{
00028   
00041 template< class TInputSample >
00042 class ITK_EXPORT SampleAlgorithmBase : public Object
00043 {
00044 public:
00046   typedef SampleAlgorithmBase Self;
00047   typedef Object Superclass ;
00048   typedef SmartPointer< Self > Pointer;
00049   typedef SmartPointer< const Self > ConstPointer;
00050 
00052   itkTypeMacro(SampleAlgorithmBase, Object);
00053   itkNewMacro(Self) ;
00054   
00056   typedef TInputSample InputSampleType ;
00057 
00059   void SetInputSample(TInputSample* sample) 
00060   {
00061     if ( m_InputSample != sample )
00062       {
00063         m_InputSample = sample ;
00064         this->Modified() ;
00065       }
00066   }
00067 
00068   TInputSample* GetInputSample()
00069   { return m_InputSample ; }
00070 
00074   void Update()
00075   { this->GenerateData() ; }
00076     
00077 protected:
00078   SampleAlgorithmBase() ;
00079   virtual ~SampleAlgorithmBase() {}
00080   void PrintSelf(std::ostream& os, Indent indent) const;
00081 
00083   virtual void GenerateData() ;
00084 
00085 private:
00087   TInputSample* m_InputSample ;
00088 } ; // end of class
00089     
00090   } // end of namespace Statistics 
00091 } // end of namespace itk 
00092 
00093 #ifndef ITK_MANUAL_INSTANTIATION
00094 #include "itkSampleAlgorithmBase.txx"
00095 #endif
00096 
00097 #endif
00098 

Generated at Wed Mar 12 01:13:10 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000