ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkKullbackLeiblerCompareHistogramImageToImageMetric.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 itkKullbackLeiblerCompareHistogramImageToImageMetric_h
19 #define itkKullbackLeiblerCompareHistogramImageToImageMetric_h
20 
22 
23 namespace itk
24 {
71 template< typename TFixedImage, typename TMovingImage >
73  public CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >
74 {
75 public:
82 
84  itkNewMacro(Self);
85 
89 
91  typedef typename Superclass::RealType RealType;
98 
104  typedef typename Superclass::MovingImageConstPointer
106 
109  typedef typename Superclass::MeasurementVectorType
111 
117 
119  itkSetMacro(Epsilon, double);
120 
122  itkGetConstReferenceMacro(Epsilon, double);
123 
125  unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
126  { return this->GetTransform()->GetNumberOfParameters(); }
127 
131  void Initialize() throw ( ExceptionObject ) ITK_OVERRIDE;
132 
133 protected:
137  virtual ~KullbackLeiblerCompareHistogramImageToImageMetric(){}
138  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
140 
142  void FormTrainingHistogram()
143  throw ( ExceptionObject );
144 
146  virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE;
147 
148  double m_Epsilon;
149 
150 private:
151  // Purposely not implemented.
153  void operator=(Self const &); // Purposely not implemented.
154 };
155 } // End namespace itk.
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 #include "itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx"
159 #endif
160 
161 #endif // itkKullbackLeiblerCompareHistogramImageToImageMetric_h
Computes the Kubler Lieblach(KL) metric between the histogram of the two images to be registered and ...
Light weight base class for most itk classes.
Superclass::MovingImageConstPointer MovingImageConstPointer
virtual NumberOfParametersType GetNumberOfParameters(void) const override
Definition: itkTransform.h:415
void PrintSelf(std::ostream &os, Indent indent) const override
virtual const TransformType * GetTransform() const
virtual MeasureType EvaluateMeasure(HistogramType &histogram) const override
Standard exception handling object.
HistogramType::MeasurementVectorType MeasurementVectorType
Superclass::TransformParametersType TransformParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Compares Histograms between two images to be registered to a Training Histogram.
Computes similarity between two objects to be registered.
CompareHistogramImageToImageMetric< TFixedImage, TMovingImage > Superclass