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

itkKappaStatisticImageToImageMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkKappaStatisticImageToImageMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/10/18 21:47:38 $
00007   Version:   $Revision: 1.2 $
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 __itkKappaStatisticImageToImageMetric_h
00018 #define __itkKappaStatisticImageToImageMetric_h
00019 
00020 #include "itkImageToImageMetric.h"
00021 
00022 namespace itk
00023 {
00051 template < class TFixedImage, class TMovingImage > 
00052 class ITK_EXPORT KappaStatisticImageToImageMetric : 
00053     public ImageToImageMetric< TFixedImage, TMovingImage>
00054 {
00055 public:
00056 
00058   typedef KappaStatisticImageToImageMetric    Self;
00059   typedef ImageToImageMetric<TFixedImage, TMovingImage >  Superclass;
00060 
00061   typedef SmartPointer<Self>         Pointer;
00062   typedef SmartPointer<const Self>   ConstPointer;
00063 
00065   itkNewMacro(Self);
00066  
00068   itkTypeMacro(KappaStatisticImageToImageMetric, ImageToImageMetric);
00069  
00071   typedef typename Superclass::RealType                 RealType;
00072   typedef typename Superclass::TransformType            TransformType;
00073   typedef typename Superclass::TransformPointer         TransformPointer;
00074   typedef typename Superclass::TransformParametersType  TransformParametersType;
00075   typedef typename Superclass::TransformJacobianType    TransformJacobianType;
00076   typedef typename Superclass::GradientPixelType        GradientPixelType;
00077 
00078   typedef typename Superclass::MeasureType              MeasureType;
00079   typedef typename Superclass::DerivativeType           DerivativeType;
00080   typedef typename Superclass::FixedImageType           FixedImageType;
00081   typedef typename Superclass::MovingImageType          MovingImageType;
00082   typedef typename Superclass::FixedImageConstPointer   FixedImageConstPointer;
00083   typedef typename Superclass::MovingImageConstPointer  MovingImageConstPointer;
00084   typedef typename Superclass::FixedImageRegionType     FixedImageRegionType;
00085 
00086 
00088   void GetDerivative( const TransformParametersType &,
00089                       DerivativeType & derivative ) const
00090     {
00091       itkWarningMacro(<< "This metric does not provide metric derivatives.");
00092       derivative.Fill( NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
00093     }
00094 
00095 
00101   MeasureType GetValue( const TransformParametersType & parameters ) const;
00102 
00103 
00106   itkSetMacro(ForegroundValue, RealType); 
00107   itkGetMacro(ForegroundValue, RealType);
00108 
00109 
00114   itkSetMacro(Complement, bool);
00115   itkBooleanMacro(Complement);
00116   itkGetMacro(Complement, bool);
00117   
00118 
00119 protected:
00120   KappaStatisticImageToImageMetric();
00121   virtual ~KappaStatisticImageToImageMetric() {};
00122   void PrintSelf(std::ostream& os, Indent indent) const;
00123 
00124 
00125 private:
00126   KappaStatisticImageToImageMetric(const Self&); //purposely not implemented
00127   void operator=(const Self&); //purposely not implemented
00128 
00129   RealType  m_ForegroundValue;
00130   bool      m_Complement;
00131   
00132 };
00133 
00134 } // end namespace itk
00135 
00136 #ifndef ITK_MANUAL_INSTANTIATION
00137 #include "itkKappaStatisticImageToImageMetric.txx"
00138 #endif
00139 
00140 #endif
00141 
00142 
00143 

Generated at Wed Mar 30 00:00:22 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000