00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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::GradientImageType GradientImageType;
00077 typedef typename Superclass::GradientPixelType GradientPixelType;
00078 typedef typename Superclass::InputPointType InputPointType;
00079 typedef typename Superclass::OutputPointType OutputPointType;
00080
00081 typedef typename Superclass::MeasureType MeasureType;
00082 typedef typename Superclass::DerivativeType DerivativeType;
00083 typedef typename Superclass::FixedImageType FixedImageType;
00084 typedef typename Superclass::MovingImageType MovingImageType;
00085 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
00086 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
00087 typedef typename Superclass::FixedImageRegionType FixedImageRegionType;
00088
00090 void ComputeGradient();
00091
00093 void GetDerivative( const TransformParametersType &,
00094 DerivativeType & derivative ) const;
00095
00101 MeasureType GetValue( const TransformParametersType & parameters ) const;
00102
00105 void GetValueAndDerivative( const TransformParametersType & parameters,
00106 MeasureType& Value, DerivativeType& Derivative ) const;
00107
00110 itkSetMacro(ForegroundValue, RealType);
00111 itkGetMacro(ForegroundValue, RealType);
00113
00114
00119 itkSetMacro(Complement, bool);
00120 itkBooleanMacro(Complement);
00121 itkGetMacro(Complement, bool);
00123
00124
00125 protected:
00126 KappaStatisticImageToImageMetric();
00127 virtual ~KappaStatisticImageToImageMetric() {};
00128 void PrintSelf(std::ostream& os, Indent indent) const;
00129
00130
00131 private:
00132 KappaStatisticImageToImageMetric(const Self&);
00133 void operator=(const Self&);
00134
00135 RealType m_ForegroundValue;
00136 bool m_Complement;
00137
00138 };
00139
00140 }
00141
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkKappaStatisticImageToImageMetric.txx"
00144 #endif
00145
00146 #endif
00147
00148
00149
00150