#include <itkKullbackLeiblerCompareHistogramImageToImageMetric.h>
Computes the Kubler Lieblach(KL) metric between the histogram of the two images to be registered and a training histogram.
This class is templated over the type of the fixed and moving images to be compared.
This class computers the KL-metric by comparing the histograms of the testing histogram formed by the overlap of intensities in the images, to a training histogram. It is based on the algorithm described in [25].
The metric is given by KL(P_test||P_train) = Sum_{i1,i2} P_test(i1,i2) std::log(P_test(i1,i2)/P_train(i1,i2)) where P_test and P_train are probabilities given my normalized histograms, and i1 and i2 are the intensity bins in the histogram.
Definition at line 66 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
MeasureType | EvaluateMeasure (HistogramType &histogram) const override |
void | FormTrainingHistogram () |
KullbackLeiblerCompareHistogramImageToImageMetric () | |
~KullbackLeiblerCompareHistogramImageToImageMetric () override=default | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
![]() | |
void | FormTrainingHistogram () |
CompareHistogramImageToImageMetric () | |
~CompareHistogramImageToImageMetric () override=default | |
![]() | |
void | ComputeHistogram (const TransformParametersType ¶meters, HistogramType &histogram) const |
void | ComputeHistogram (const TransformParametersType ¶meters, unsigned int parameter, double step, HistogramType &histogram) const |
void | CopyHistogram (HistogramType &target, HistogramType &source) const |
HistogramImageToImageMetric () | |
~HistogramImageToImageMetric () override=default | |
![]() | |
virtual void | ComputeImageDerivatives (const MovingImagePointType &mappedPoint, ImageDerivativesType &gradient, ThreadIdType threadId) const |
void | GetValueAndDerivativeMultiThreadedInitiate () const |
void | GetValueAndDerivativeMultiThreadedPostProcessInitiate () const |
virtual void | GetValueAndDerivativeThread (ThreadIdType threadId) const |
virtual void | GetValueAndDerivativeThreadPostProcess (ThreadIdType threadId, bool withinSampleThread) const |
virtual void | GetValueAndDerivativeThreadPreProcess (ThreadIdType threadId, bool withinSampleThread) const |
virtual bool | GetValueAndDerivativeThreadProcessSample (ThreadIdType threadId, SizeValueType fixedImageSample, const MovingImagePointType &mappedPoint, double movingImageValue, const ImageDerivativesType &movingImageGradientValue) const |
ImageToImageMetric () | |
virtual void | PreComputeTransformValues () |
virtual void | SampleFixedImageIndexes (FixedImageSampleContainer &samples) const |
virtual void | SampleFixedImageRegion (FixedImageSampleContainer &samples) const |
virtual void | SampleFullFixedImageRegion (FixedImageSampleContainer &samples) const |
virtual void | SynchronizeTransforms () const |
virtual void | TransformPoint (unsigned int sampleNumber, MovingImagePointType &mappedPoint, bool &sampleOk, double &movingImageValue, ThreadIdType threadId) const |
virtual void | TransformPointWithDerivatives (unsigned int sampleNumber, MovingImagePointType &mappedPoint, bool &sampleOk, double &movingImageValue, ImageDerivativesType &movingImageGradient, ThreadIdType threadId) const |
~ImageToImageMetric () override=default | |
void | GetValueMultiThreadedInitiate () const |
void | GetValueMultiThreadedPostProcessInitiate () const |
virtual void | GetValueThread (ThreadIdType threadId) const |
virtual void | GetValueThreadPreProcess (ThreadIdType threadId, bool withinSampleThread) const |
virtual bool | GetValueThreadProcessSample (ThreadIdType threadId, SizeValueType fixedImageSample, const MovingImagePointType &mappedPoint, double movingImageValue) const |
virtual void | GetValueThreadPostProcess (ThreadIdType threadId, bool withinSampleThread) const |
![]() | |
SingleValuedCostFunction ()=default | |
~SingleValuedCostFunction () override | |
![]() | |
CostFunctionTemplate ()=default | |
CostFunctionTemplate ()=default | |
~CostFunctionTemplate () override=default | |
~CostFunctionTemplate () override=default | |
![]() | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
![]() | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
using itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 76 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
using itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::HistogramFrequencyType |
Definition at line 92 of file itkCompareHistogramImageToImageMetric.h.
using itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::HistogramIteratorType |
Definition at line 94 of file itkCompareHistogramImageToImageMetric.h.
using itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::HistogramMeasurementVectorType = typename Superclass::MeasurementVectorType |
Definition at line 102 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
using itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::HistogramPointerType |
Definition at line 95 of file itkCompareHistogramImageToImageMetric.h.
using itk::HistogramImageToImageMetric< TFixedImage, TMovingImage >::HistogramSizeType |
Definition at line 89 of file itkHistogramImageToImageMetric.h.
using itk::HistogramImageToImageMetric< TFixedImage, TMovingImage >::HistogramType |
Typedefs for histogram. This should have been defined as Histogram<RealType,2> but a bug in VC++7 produced an internal compiler error with such declaration.
Definition at line 88 of file itkHistogramImageToImageMetric.h.
using itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::Pointer = SmartPointer<Self> |
Definition at line 75 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
using itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::Self = KullbackLeiblerCompareHistogramImageToImageMetric |
Standard class type aliases.
Definition at line 73 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
using itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::Superclass = CompareHistogramImageToImageMetric<TFixedImage, TMovingImage> |
Definition at line 74 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
using itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::TransformConstPointer = typename Superclass::ConstPointer |
Definition at line 88 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
|
protected |
Constructor is protected to ensure that New()
function is used to create instances.
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
Constructor is protected to ensure that New()
function is used to create instances.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
|
overrideprotectedvirtual |
Evaluates the mutual information from the histogram.
Implements itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >.
|
protected |
Form the Histogram for the Training data
|
virtual |
Get epsilon, the histogram frequency to use if the frequency is 0
|
overridevirtual |
Reimplemented from itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >.
References KullbackLeiblerCompareHistogramImageToImageMetric().
|
inlineoverridevirtual |
Return the number of parameters required by the Transform
Reimplemented from itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >.
Definition at line 118 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
References itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetTransform().
|
overridevirtual |
Forms the histogram of the training images to prepare to evaluate the metric. Must set all parameters first
Reimplemented from itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Constructor is protected to ensure that New()
function is used to create instances.
Reimplemented from itk::CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >.
|
virtual |
Set epsilon, which is added to each bin in both Histogram
|
protected |
Definition at line 146 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.