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

itkKullbackLeiblerCompareHistogramImageToImageMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkKullbackLeiblerCompareHistogramImageToImageMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-01-24 20:02:57 $
00007   Version:   $Revision: 1.6 $
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 __itkKullbackLeiblerCompareHistogramImageToImageMetric_h
00018 #define __itkKullbackLeiblerCompareHistogramImageToImageMetric_h
00019 
00020 #include "itkCompareHistogramImageToImageMetric.h"
00021 
00022 namespace itk
00023 {
00069 template <class TFixedImage, class TMovingImage>
00070 class ITK_EXPORT KullbackLeiblerCompareHistogramImageToImageMetric :
00071 public CompareHistogramImageToImageMetric<TFixedImage, TMovingImage>
00072 {
00073 public:
00075   typedef KullbackLeiblerCompareHistogramImageToImageMetric Self;
00076   typedef CompareHistogramImageToImageMetric<TFixedImage, TMovingImage>
00077                                                             Superclass;
00078   typedef SmartPointer<Self>                                Pointer;
00079   typedef SmartPointer<const Self>                          ConstPointer;
00080 
00082   itkNewMacro(Self);
00083 
00085   itkTypeMacro(KullbackLeiblerCompareHistogramImageToImageMetric,
00086     HistogramImageToImageMetric);
00087 
00089   typedef typename Superclass::RealType                 RealType;
00090   typedef typename Superclass::TransformType            TransformType;
00091   typedef typename Superclass::TransformPointer         TransformPointer;
00092   typedef typename Superclass::ConstPointer             TransformConstPointer;
00093   typedef typename Superclass::TransformParametersType
00094     TransformParametersType;
00095   typedef typename Superclass::TransformJacobianType    TransformJacobianType;
00096   typedef typename Superclass::GradientPixelType        GradientPixelType;
00097 
00098   typedef typename Superclass::MeasureType              MeasureType;
00099   typedef typename Superclass::DerivativeType           DerivativeType;
00100   typedef typename Superclass::FixedImageType           FixedImageType;
00101   typedef typename Superclass::MovingImageType          MovingImageType;
00102   typedef typename Superclass::FixedImageConstPointer   FixedImageConstPointer;
00103   typedef typename Superclass::MovingImageConstPointer
00104     MovingImageConstPointer;
00105 
00106   typedef typename Superclass::HistogramType            HistogramType;
00107   typedef typename Superclass::HistogramSizeType        HistogramSizeType;
00108   typedef typename Superclass::MeasurementVectorType
00109     HistogramMeasurementVectorType;
00110 
00111   typedef typename Superclass::HistogramFrequencyType   HistogramFrequencyType;
00112   typedef typename Superclass::HistogramIteratorType    HistogramIteratorType;
00113   typedef typename Superclass::HistogramPointerType     HistogramPointerType;
00114   typedef typename Superclass::InterpolatorType         InterpolatorType;
00115   typedef typename Superclass::InterpolatorPointer      InterpolatorPointer;
00116 
00118   itkSetMacro( Epsilon, double );
00119 
00121   itkGetConstReferenceMacro( Epsilon, double );
00122 
00124   unsigned int GetNumberOfParameters(void) const 
00125   { return this->GetTransform()->GetNumberOfParameters(); }
00126 
00130   void Initialize() throw (ExceptionObject);
00131 
00132 protected:
00135   KullbackLeiblerCompareHistogramImageToImageMetric();
00136   virtual ~KullbackLeiblerCompareHistogramImageToImageMetric(){}
00137   void PrintSelf(std::ostream& os, Indent indent) const;
00139 
00141   void FormTrainingHistogram() throw (ExceptionObject);
00142 
00144   virtual MeasureType EvaluateMeasure(HistogramType& histogram) const;
00145 
00146   double                  m_Epsilon;
00147 
00148 private:
00149   // Purposely not implemented.
00150   KullbackLeiblerCompareHistogramImageToImageMetric(Self const&);
00151   void operator=(Self const&); // Purposely not implemented.
00152 };
00153 
00154 } // End namespace itk.
00155 
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkKullbackLeiblerCompareHistogramImageToImageMetric.txx"
00158 #endif
00159 
00160 #endif // __itkKullbackLeiblerCompareHistogramImageToImageMetric_h
00161 

Generated at Mon Jul 12 2010 18:55:22 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000