ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkKappaStatisticImageToImageMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkKappaStatisticImageToImageMetric_h
19 #define __itkKappaStatisticImageToImageMetric_h
20 
21 #include "itkImageToImageMetric.h"
22 
23 namespace itk
24 {
53 template< class TFixedImage, class TMovingImage >
55  public ImageToImageMetric< TFixedImage, TMovingImage >
56 {
57 public:
58 
64 
66  itkNewMacro(Self);
67 
70 
72  typedef typename Superclass::RealType RealType;
73  typedef typename Superclass::TransformType TransformType;
74  typedef typename Superclass::TransformPointer TransformPointer;
75  typedef typename Superclass::TransformParametersType TransformParametersType;
76  typedef typename Superclass::TransformJacobianType TransformJacobianType;
77  typedef typename Superclass::GradientImageType GradientImageType;
78  typedef typename Superclass::GradientPixelType GradientPixelType;
79  typedef typename Superclass::InputPointType InputPointType;
80  typedef typename Superclass::OutputPointType OutputPointType;
81 
82  typedef typename Superclass::MeasureType MeasureType;
83  typedef typename Superclass::DerivativeType DerivativeType;
84  typedef typename Superclass::FixedImageType FixedImageType;
85  typedef typename Superclass::MovingImageType MovingImageType;
86  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
87  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
88  typedef typename Superclass::FixedImageRegionType FixedImageRegionType;
89 
91  void ComputeGradient();
92 
94  void GetDerivative(const TransformParametersType &,
95  DerivativeType & derivative) const;
96 
102  MeasureType GetValue(const TransformParametersType & parameters) const;
103 
106  void GetValueAndDerivative(const TransformParametersType & parameters,
107  MeasureType & Value, DerivativeType & Derivative) const;
108 
111  itkSetMacro(ForegroundValue, RealType);
112  itkGetConstMacro(ForegroundValue, RealType);
114 
119  itkSetMacro(Complement, bool);
120  itkBooleanMacro(Complement);
121  itkGetConstMacro(Complement, bool);
123 
124 protected:
127  void PrintSelf(std::ostream & os, Indent indent) const;
128 
129 private:
130  KappaStatisticImageToImageMetric(const Self &); //purposely not implemented
131  void operator=(const Self &); //purposely not implemented
132 
135 };
136 } // end namespace itk
137 
138 #ifndef ITK_MANUAL_INSTANTIATION
139 #include "itkKappaStatisticImageToImageMetric.hxx"
140 #endif
141 
142 #endif
143