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

itkImageModelEstimatorBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageModelEstimatorBase.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/02/23 06:00:37 $
00007   Version:   $Revision: 1.7 $
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 _itkImageModelEstimatorBase_h
00018 #define _itkImageModelEstimatorBase_h
00019 
00020 #include "itkLightProcessObject.h"
00021 
00022 namespace itk
00023 {
00024 
00063 template <class TInputImage,
00064           class TMembershipFunction>
00065 class ITK_EXPORT ImageModelEstimatorBase: public LightProcessObject
00066 {
00067 public:
00069   typedef ImageModelEstimatorBase   Self;
00070   typedef LightProcessObject Superclass;
00071   typedef SmartPointer<Self>  Pointer;
00072   typedef SmartPointer<const Self>  ConstPointer;
00073 
00075   itkTypeMacro(ImageModelEstimatorBase,LightProcessObject);
00076 
00078   itkSetMacro(NumberOfModels, unsigned int);
00079 
00081   itkGetConstMacro(NumberOfModels, unsigned int);
00082 
00084   typedef typename TMembershipFunction::Pointer MembershipFunctionPointer ;
00085 
00086   typedef std::vector< MembershipFunctionPointer > 
00087     MembershipFunctionPointerVector;
00088 
00090   typedef          TInputImage          InputImageType;
00091   typedef typename TInputImage::Pointer InputImagePointer;
00092 
00094   //typedef typename TTrainingImage::Pointer TrainingImagePointer;
00095 
00097   itkSetObjectMacro(InputImage,InputImageType);
00098 
00100   itkGetObjectMacro(InputImage,InputImageType);
00101 
00103   void SetMembershipFunctions(MembershipFunctionPointerVector 
00104     membershipFunctions)
00105     {
00106     m_MembershipFunctions = membershipFunctions;
00107     }
00108   
00110   const MembershipFunctionPointerVector GetMembershipFunctions() const
00111     {
00112     return m_MembershipFunctions;
00113     }
00114 
00116   unsigned int GetNumberOfMembershipFunctions() 
00117     {
00118     return static_cast<unsigned int>( m_MembershipFunctions.size() );
00119     }
00120 
00122   void DeleteAllMembershipFunctions() 
00123     {
00124     m_MembershipFunctions.resize(0);
00125     }
00126 
00128   unsigned int AddMembershipFunction(MembershipFunctionPointer function);
00129 
00132   void Update() ;
00133 
00134 protected:
00135   ImageModelEstimatorBase();
00136   ~ImageModelEstimatorBase();
00137   void PrintSelf(std::ostream& os, Indent indent) const;
00138 
00139   virtual void GenerateData();
00140 
00141 private:
00142 
00143   ImageModelEstimatorBase(const Self&); //purposely not implemented
00144   void operator=(const Self&); //purposely not implemented
00145 
00146   unsigned int                    m_NumberOfModels;
00147 
00149   MembershipFunctionPointerVector m_MembershipFunctions;
00150 
00152   InputImagePointer               m_InputImage;
00153 
00155   virtual void EstimateModels() = 0;
00156 }; // class ImageModelEstimator
00157 
00158 
00159 } // namespace itk
00160 
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkImageModelEstimatorBase.txx"
00163 #endif
00164 
00165 
00166 
00167 #endif
00168 
00169 
00170 
00171 
00172 
00173 
00174 
00175 
00176 
00177 
00178 
00179 
00180 
00181 
00182 
00183 

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