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

itkImageGaussianModelEstimator.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageGaussianModelEstimator.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:32 $ 00007 Version: $Revision: 1.8 $ 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 _itkImageGaussianModelEstimator_h 00018 #define _itkImageGaussianModelEstimator_h 00019 00020 #include <math.h> 00021 #include <float.h> 00022 00023 #include "vnl/vnl_vector.h" 00024 #include "vnl/vnl_matrix.h" 00025 #include "vnl/vnl_math.h" 00026 #include "vnl/algo/vnl_matrix_inverse.h" 00027 00028 00029 #include "itkImageRegionIterator.h" 00030 #include "itkExceptionObject.h" 00031 00032 #include "itkImageModelEstimatorBase.h" 00033 00034 namespace itk 00035 { 00036 00076 template <class TInputImage, 00077 class TMembershipFunction, 00078 class TTrainingImage> 00079 class ITK_EXPORT ImageGaussianModelEstimator: 00080 public ImageModelEstimatorBase<TInputImage, TMembershipFunction> 00081 { 00082 public: 00084 typedef ImageGaussianModelEstimator Self; 00085 typedef ImageModelEstimatorBase<TInputImage,TMembershipFunction> Superclass; 00086 00087 typedef SmartPointer<Self> Pointer; 00088 typedef SmartPointer<const Self> ConstPointer; 00089 00091 itkNewMacro(Self); 00092 00094 itkTypeMacro(ImageGaussianModelEstimator, ImageModelEstimatorBase); 00095 00097 typedef typename TInputImage::Pointer InputImagePointer; 00098 00100 typedef typename TTrainingImage::Pointer TrainingImagePointer; 00101 00104 typedef typename TInputImage::PixelType InputImagePixelType; 00105 00108 typedef typename TTrainingImage::PixelType TrainingImagePixelType; 00109 00111 typedef 00112 ImageRegionIterator< TInputImage > InputImageIterator; 00113 typedef 00114 ImageRegionIterator< TTrainingImage > TrainingImageIterator; 00115 00117 typedef typename TMembershipFunction::Pointer MembershipFunctionPointer ; 00118 00120 itkSetMacro(TrainingImage,TrainingImagePointer); 00121 00123 itkGetMacro(TrainingImage,TrainingImagePointer); 00124 00125 00126 00127 protected: 00128 ImageGaussianModelEstimator(); 00129 ~ImageGaussianModelEstimator(); 00130 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00131 00133 void GenerateData() ; 00134 00135 private: 00136 ImageGaussianModelEstimator(const Self&); //purposely not implemented 00137 void operator=(const Self&); //purposely not implemented 00138 00139 typedef vnl_matrix<double> MatrixType; 00140 typedef vnl_vector<double> VectorType; 00141 00142 typedef typename TInputImage::SizeType InputImageSizeType; 00143 00145 itkStaticConstMacro(VectorDimension, unsigned int, 00146 InputImagePixelType::Dimension); 00147 typedef vnl_matrix_fixed<double,1,itkGetStaticConstMacro(VectorDimension)> ColumnVectorType; 00148 00149 MatrixType m_NumberOfSamples; 00150 MatrixType m_Means; 00151 MatrixType *m_Covariance; 00152 00153 TrainingImagePointer m_TrainingImage; 00154 00158 virtual void EstimateModels(); 00159 00160 void EstimateGaussianModelPrameters(); 00161 00162 }; // class ImageGaussianModelEstimator 00163 00164 } // namespace itk 00165 00166 #ifndef ITK_MANUAL_INSTANTIATION 00167 #include "itkImageGaussianModelEstimator.txx" 00168 #endif 00169 00170 00171 00172 #endif

Generated at Sat Mar 31 02:20:57 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000