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

itkCumulativeGaussianOptimizer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCumulativeGaussianOptimizer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/11/08 19:39:22 $
00007   Version:   $Revision: 1.4 $
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 
00018 #ifndef _itkCumulativeGaussianOptimizer_h
00019 #define _itkCumulativeGaussianOptimizer_h
00020 
00021 #include "itkMultipleValuedNonLinearOptimizer.h"
00022 #include "itkCumulativeGaussianCostFunction.h"
00023 
00024 namespace itk
00025 {
00026 
00047 class ITK_EXPORT CumulativeGaussianOptimizer : 
00048     public MultipleValuedNonLinearOptimizer
00049 {
00050 
00051 public:
00052 
00054   typedef CumulativeGaussianOptimizer           Self;
00055   typedef MultipleValuedNonLinearOptimizer      Superclass;
00056   typedef SmartPointer<Self>                    Pointer;
00057   typedef SmartPointer<const Self>              ConstPointer;
00058   
00060   typedef CumulativeGaussianCostFunction CostFunctionType;
00061   
00063   typedef CostFunctionType::MeasureType MeasureType;
00064 
00066   itkNewMacro(Self);
00067 
00069   itkTypeMacro(CumulativeGaussianOptimizer, MultipleValuedNonLinearOptimizer);
00070 
00072   itkSetMacro(DifferenceTolerance, double);
00073   itkSetMacro(Verbose, bool);
00074   itkGetMacro(ComputedMean, double);
00075   itkGetMacro(ComputedStandardDeviation, double);
00076   itkGetMacro(UpperAsymptote, double);
00077   itkGetMacro(LowerAsymptote, double);
00078   itkGetMacro(FinalSampledArray, MeasureType*);
00079   itkGetMacro(FitError, double);
00080 
00081   void SetDataArray(MeasureType * dataArray);
00082 
00084   void StartOptimization();
00085   
00087   void PrintArray(MeasureType * array);
00088 
00089 protected:
00090   CumulativeGaussianOptimizer();
00091   virtual ~CumulativeGaussianOptimizer();
00092   void PrintSelf(std::ostream &os, Indent indent) const;
00093 
00094 private:
00095 
00097   double  m_DifferenceTolerance;
00098   
00100   double  m_ComputedMean; 
00101   
00103   double  m_ComputedStandardDeviation; 
00104   
00106   double  m_ComputedAmplitude;  
00107   
00109   double  m_ComputedTransitionHeight;
00110   
00112   double  m_UpperAsymptote;
00113   
00115   double  m_LowerAsymptote;
00116   
00118   double  m_OffsetForMean;
00119 
00121   bool m_Verbose;
00122 
00124   double m_FitError;
00125 
00127   MeasureType * m_FinalSampledArray;
00128 
00130   MeasureType * m_CumulativeGaussianArray;
00131 
00133   MeasureType * ExtendGaussian(MeasureType * originalArray, MeasureType * extendedArray, int startingPointForInsertion);
00134   
00136   MeasureType * RecalculateExtendedArrayFromGaussianParameters(MeasureType * originalArray,
00137                                                                MeasureType * extendedArray,
00138                                                                int startingPointForInsertion);
00139 
00141   double FindAverageSumOfSquaredDifferences(MeasureType * array1, MeasureType * array2);
00142 
00144   void FindParametersOfGaussian(MeasureType * sampledGaussianArray);
00145 
00147   void MeasureGaussianParameters(MeasureType * array);
00148   
00150   void PrintComputedParameterHeader();
00151   
00153   void PrintComputedParameters();
00154   
00156   double VerticalBestShift(MeasureType * originalArray, MeasureType * newArray);
00157 };
00158 
00159 } // end namespace itk
00160 
00161 #endif
00162 
00163 
00164 

Generated at Wed May 24 23:00:25 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000