15 #ifndef itkHistogramSimilarityMeasure_h
16 #define itkHistogramSimilarityMeasure_h
32 template <
class TFixedImage,
class TMovingImage>
65 void Initialize() throw (ExceptionObject);
68 void SetHistogramSize(
int x,
int y)
74 HistogramSizeType
size(2);
77 this->SetHistogramSize(size);
84 itkSetMacro( HistogramSize, HistogramSizeType );
87 itkGetConstReferenceMacro( HistogramSize, HistogramSizeType );
93 itkGetObjectMacro( Histogram, HistogramType );
100 itkSetMacro(UseParzenFilling,
bool);
101 itkGetMacro(UseParzenFilling,
bool);
104 double GetParzenValue(
double x);
107 double GetParzenDerivative(
double x);
115 HistogramSizeType m_HistogramSize;
122 HistogramMeasurementVectorType lowerBounds(2);
123 lowerBounds[0] = this->GetFixedLowerBound();
124 lowerBounds[1] = this->GetMovingLowerBound();
125 HistogramMeasurementVectorType upperBounds(2);
126 upperBounds[0] = this->GetFixedUpperBound();
127 upperBounds[1] = this->GetMovingUpperBound();
130 this->m_Histogram->Initialize( this->m_HistogramSize, lowerBounds, upperBounds );
131 this->m_Histogram->SetToZero();
138 void AggregateCostFunctionPair(FixedImagePixelType fixedValue, MovingImagePixelType movingValue);
141 void PrintSelf(std::ostream& os, Indent indent)
const;
144 MeasureType
MeanFixed()
const {
return this->m_Histogram->MeanFixed(); }
147 MeasureType
MeanMoving()
const {
return this->m_Histogram->MeanMoving(); }
150 MeasureType
VarianceFixed()
const {
return this->m_Histogram->VarianceFixed(); }
153 MeasureType
VarianceMoving()
const {
return this->m_Histogram->VarianceMoving(); }
156 MeasureType
Covariance()
const {
return this->m_Histogram->Covariance(); }
159 MeasureType
EntropyFixed()
const {
return this->m_Histogram->EntropyFixed(); }
162 MeasureType
EntropyMoving()
const {
return this->m_Histogram->EntropyMoving(); }
165 MeasureType
JointEntropy()
const {
return this->m_Histogram->JointEntropy(); }
175 void operator=(
const Self&);
178 bool m_UseParzenFilling;
184 #ifndef ITK_MANUAL_INSTANTIATION
185 #include "itkHistogramSimilarityMeasure.txx"
188 #endif // __itkHistogramSimilarityMeasure_h
MeasureType EntropyMoving() const
Definition: itkHistogramSimilarityMeasure.h:162
Superclass::SizeType SizeType
Definition: itkUCLHistogram.h:46
void ResetCostFunction()
Definition: itkHistogramSimilarityMeasure.h:120
Computes similarity between two objects to be registered using Histogram.
Definition: itkHistogramSimilarityMeasure.h:33
HistogramType::SizeType HistogramSizeType
Definition: itkHistogramSimilarityMeasure.h:59
Abstract base class, implementing TemplateMethod [2] for similarity measures.
Definition: itkSimilarityMeasure.h:56
SmartPointer< const Self > ConstPointer
Definition: itkHistogramSimilarityMeasure.h:42
SmartPointer< Self > Pointer
Definition: itkUCLHistogram.h:40
HistogramType::AbsoluteFrequencyType HistogramFrequencyType
Definition: itkHistogramSimilarityMeasure.h:61
MeasureType EntropyFixed() const
Definition: itkHistogramSimilarityMeasure.h:159
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1236
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::FixedImageType::PixelType FixedImagePixelType
Definition: itkSimilarityMeasure.h:84
HistogramPointer m_Histogram
Definition: itkHistogramSimilarityMeasure.h:171
Superclass::MovingImagePixelType MovingImagePixelType
Definition: itkHistogramSimilarityMeasure.h:52
Superclass::MeasureType MeasureType
Definition: itkHistogramSimilarityMeasure.h:45
#define niftkitkDebugMacro(x)
Definition: itkUCLMacro.h:29
MeasureType MeanFixed() const
Definition: itkHistogramSimilarityMeasure.h:144
virtual ~HistogramSimilarityMeasure()
Definition: itkHistogramSimilarityMeasure.h:112
Superclass::FixedImagePixelType FixedImagePixelType
Definition: itkHistogramSimilarityMeasure.h:51
MeasureType VarianceMoving() const
Definition: itkHistogramSimilarityMeasure.h:153
Extends Histogram to provide standard Entropy functions.
Definition: itkUCLHistogram.h:32
SimilarityMeasure< TFixedImage, TMovingImage > Superclass
Definition: itkHistogramSimilarityMeasure.h:40
HistogramType::MeasurementVectorType HistogramMeasurementVectorType
Definition: itkHistogramSimilarityMeasure.h:60
HistogramType::Pointer HistogramPointer
Definition: itkHistogramSimilarityMeasure.h:58
MeasureType VarianceFixed() const
Definition: itkHistogramSimilarityMeasure.h:150
AbstractBase class, just to implement the finite difference gradient method.
Definition: itkFiniteDifferenceGradientSimilarityMeasure.h:32
MeasureType JointEntropy() const
Definition: itkHistogramSimilarityMeasure.h:165
std::string ConvertToString(int x)
Definition: niftkConversionUtils.cxx:26
GLint GLint GLint GLint GLint x
Definition: glew.h:1236
Statistics::UCLHistogram< double, 2 > HistogramType
Definition: itkHistogramSimilarityMeasure.h:57
GLsizeiptr size
Definition: glew.h:1665
MeasureType Covariance() const
Definition: itkHistogramSimilarityMeasure.h:156
Superclass::MeasureType MeasureType
Definition: itkSimilarityMeasure.h:80
Superclass::DerivativeType DerivativeType
Definition: itkSimilarityMeasure.h:81
Superclass::ParametersType ParametersType
Definition: itkHistogramSimilarityMeasure.h:49
HistogramSimilarityMeasure Self
Definition: itkHistogramSimilarityMeasure.h:39
HistogramType::Iterator HistogramIteratorType
Definition: itkHistogramSimilarityMeasure.h:62
Superclass::MovingImageType::PixelType MovingImagePixelType
Definition: itkSimilarityMeasure.h:87
Superclass::DerivativeType DerivativeType
Definition: itkHistogramSimilarityMeasure.h:50
MeasureType MeanMoving() const
Definition: itkHistogramSimilarityMeasure.h:147
SmartPointer< Self > Pointer
Definition: itkHistogramSimilarityMeasure.h:41