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::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
00087 void ComputeGradient();
00088
00090 void GetDerivative( const TransformParametersType &,
00091 DerivativeType & derivative ) const;
00092
00098 MeasureType GetValue( const TransformParametersType & parameters ) const;
00099
00102 void GetValueAndDerivative( const TransformParametersType & parameters,
00103 MeasureType& Value, DerivativeType& Derivative ) const;
00104
00107 itkSetMacro(ForegroundValue, RealType);
00108 itkGetMacro(ForegroundValue, RealType);
00110
00111
00116 itkSetMacro(Complement, bool);
00117 itkBooleanMacro(Complement);
00118 itkGetMacro(Complement, bool);
00120
00121
00122 protected:
00123 KappaStatisticImageToImageMetric();
00124 virtual ~KappaStatisticImageToImageMetric() {};
00125 void PrintSelf(std::ostream& os, Indent indent) const;
00126
00127
00128 private:
00129 KappaStatisticImageToImageMetric(const Self&);
00130 void operator=(const Self&);
00131
00132 RealType m_ForegroundValue;
00133 bool m_Complement;
00134
00135 };
00136
00137 }
00138
00139 #ifndef ITK_MANUAL_INSTANTIATION
00140 #include "itkKappaStatisticImageToImageMetric.txx"
00141 #endif
00142
00143 #endif
00144
00145
00146
00147