ITK  4.6.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
126  { return this->GetTransform()->GetNumberOfParameters(); }
127 
131  void Initialize()
132  throw ( ExceptionObject );
133 
134 protected:
138  virtual ~KullbackLeiblerCompareHistogramImageToImageMetric(){}
139  void PrintSelf(std::ostream & os, Indent indent) const;
141 
143  void FormTrainingHistogram()
144  throw ( ExceptionObject );
145 
147  virtual MeasureType EvaluateMeasure(HistogramType & histogram) const;
148 
149  double m_Epsilon;
150 
151 private:
152  // Purposely not implemented.
154  void operator=(Self const &); // Purposely not implemented.
155 };
156 } // End namespace itk.
157 
158 #ifndef ITK_MANUAL_INSTANTIATION
159 #include "itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx"
160 #endif
161 
162 #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.
virtual MeasureType EvaluateMeasure(HistogramType &histogram) const
Superclass::MovingImageConstPointer MovingImageConstPointer
virtual const TransformType * GetTransform() const
void PrintSelf(std::ostream &os, Indent indent) const
virtual NumberOfParametersType GetNumberOfParameters(void) const
Definition: itkTransform.h:399
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