NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMIImageToImageMetric.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkMIImageToImageMetric_h
16 #define itkMIImageToImageMetric_h
17 
19 
20 namespace itk
21 {
28 template < class TFixedImage, class TMovingImage >
29 class ITK_EXPORT MIImageToImageMetric :
30  public HistogramSimilarityMeasure< TFixedImage, TMovingImage>
31 {
32 public:
33 
37  typedef SmartPointer<Self> Pointer;
38  typedef SmartPointer<const Self> ConstPointer;
42 
44  itkNewMacro(Self);
45 
48 
50  bool ShouldBeMaximized() { return true; };
51 
52 protected:
53 
55  virtual ~MIImageToImageMetric() {};
56 
62  MeasureType FinalizeCostFunction()
63  {
64  return this->EntropyFixed() + this->EntropyMoving() - this->JointEntropy();
65  }
66 
67 private:
68  MIImageToImageMetric(const Self&); // purposefully not implemented
69  void operator=(const Self&); // purposefully not implemented
70 };
71 
72 } // end namespace itk
73 
74 #endif
75 
76 
77 
Computes similarity between two objects to be registered using Histogram.
Definition: itkHistogramSimilarityMeasure.h:33
HistogramSimilarityMeasure< TFixedImage, TMovingImage > Superclass
Definition: itkMIImageToImageMetric.h:36
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::FixedImageType::PixelType FixedImagePixelType
Definition: itkMIImageToImageMetric.h:39
MeasureType FinalizeCostFunction()
Definition: itkMIImageToImageMetric.h:62
Superclass::MovingImageType::PixelType MovingImagePixelType
Definition: itkMIImageToImageMetric.h:40
MIImageToImageMetric()
Definition: itkMIImageToImageMetric.h:54
Implements Mutual Information of a histogram for a similarity measure.
Definition: itkMIImageToImageMetric.h:29
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
MIImageToImageMetric Self
Definition: itkMIImageToImageMetric.h:35
Superclass::MeasureType MeasureType
Definition: itkMIImageToImageMetric.h:41
SmartPointer< const Self > ConstPointer
Definition: itkMIImageToImageMetric.h:38
bool ShouldBeMaximized()
Definition: itkMIImageToImageMetric.h:50
Superclass::MeasureType MeasureType
Definition: itkSimilarityMeasure.h:80
SmartPointer< Self > Pointer
Definition: itkMIImageToImageMetric.h:37
virtual ~MIImageToImageMetric()
Definition: itkMIImageToImageMetric.h:55