template<typename TFixedImage, typename TMovingImage>
class itk::KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, TMovingImage >
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 following paper:
Albert C.S. Chung, William M. Wells III, Alexander Norbash, and W. Eric L. Grimson, Multi-modal Image Registration by Minimising Kullback-Leibler Distance, In Medical Image Computing and Computer-Assisted Intervention - MICCAI 2002, LNCS 2489, pp. 525 - 532.
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.
- PARAMETERS
- Epsilon is added to every bin in both histograms. This prevents division by zero problems. Epsilon should generally be set to a number smaller than one divided by the total number bins in the histogram. So, for a 256 by 256 histogram, Epsilon should be much less than 1e-5. Tests have shown that choices of epsilon are not very important as long as it is small enough. The default is 1e-12. I doubt you will need to change it.
- Author
- Samson Timoner
- SUPPORT
- This work was supported by the Functional Imaging Research in Schizophrenia Testbed (FIRST) Biomedical Informatics Research Network (BIRN, https://www.birncommunity.org/), which is funded by the National Center for Research Resources at the National Institutes of Health (NIH). This work is also funded by the Neuroimage Analysis Center (P41 RR13218).
Definition at line 72 of file itkKullbackLeiblerCompareHistogramImageToImageMetric.h.
|
virtual const double & | GetEpsilon () const |
|
const char * | GetNameOfClass () const override |
|
unsigned int | GetNumberOfParameters () const override |
|
void | Initialize () override |
|
virtual void | SetEpsilon (double _arg) |
|
const char * | GetNameOfClass () const override |
|
unsigned int | GetNumberOfParameters () const override |
|
void | Initialize () override |
|
virtual void | SetTrainingHistogram (HistogramPointerType _arg) |
|
virtual const HistogramPointerType & | GetTrainingHistogram () const |
|
virtual void | SetTrainingFixedImage (const FixedImageType *_arg) |
|
virtual const FixedImageType * | GetTrainingFixedImage () const |
|
virtual void | SetTrainingMovingImage (const MovingImageType *_arg) |
|
virtual const MovingImageType * | GetTrainingMovingImage () const |
|
virtual void | SetTrainingTransform (TransformType *_arg) |
|
virtual TransformType * | GetModifiableTrainingTransform () |
|
virtual void | SetTrainingInterpolator (InterpolatorType *_arg) |
|
virtual InterpolatorType * | GetModifiableTrainingInterpolator () |
|
virtual void | SetTrainingFixedImageRegion (FixedImageRegionType _arg) |
|
virtual const FixedImageRegionType & | GetTrainingFixedImageRegion () const |
|
void | GetDerivative (const TransformParametersType ¶meters, DerivativeType &derivative) const override |
|
virtual double | GetDerivativeStepLength () const |
|
virtual const ScalesType & | GetDerivativeStepLengthScales () const |
|
virtual const HistogramPointer & | GetHistogram () const |
|
virtual const HistogramSizeType & | GetHistogramSize () const |
|
const MeasurementVectorType & | GetLowerBound () const |
|
const char * | GetNameOfClass () const override |
|
virtual const FixedImagePixelType & | GetPaddingValue () const |
|
const MeasurementVectorType & | GetUpperBound () const |
|
MeasureType | GetValue (const TransformParametersType ¶meters) const override |
|
void | GetValueAndDerivative (const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override |
|
void | Initialize () override |
|
virtual void | SetDerivativeStepLength (double _arg) |
|
virtual void | SetDerivativeStepLengthScales (ScalesType _arg) |
|
virtual void | SetHistogramSize (HistogramSizeType _arg) |
|
void | SetLowerBound (const MeasurementVectorType &bounds) |
|
virtual void | SetPaddingValue (FixedImagePixelType _arg) |
|
void | SetTransform (TransformType *transform) override |
|
void | SetUpperBound (const MeasurementVectorType &bounds) |
|
virtual void | SetUpperBoundIncreaseFactor (double _arg) |
|
virtual double | GetUpperBoundIncreaseFactor () const |
|
virtual void | SetUsePaddingValue (bool _arg) |
|
virtual bool | GetUsePaddingValue () const |
|
virtual void | ComputeGradient () |
|
virtual const FixedImageRegionType & | GetFixedImageRegion () const |
|
virtual const FixedImagePixelType & | GetFixedImageSamplesIntensityThreshold () const |
|
virtual GradientImageType * | GetModifiableGradientImage () |
|
virtual InterpolatorType * | GetModifiableInterpolator () |
|
virtual TransformType * | GetModifiableTransform () |
|
const char * | GetNameOfClass () const override |
|
SizeValueType | GetNumberOfMovingImageSamples () |
|
unsigned int | GetNumberOfParameters () const override |
|
virtual const SizeValueType & | GetNumberOfPixelsCounted () const |
|
SizeValueType | GetNumberOfSpatialSamples () |
|
virtual const bool & | GetUseAllPixels () const |
|
virtual const bool & | GetUseFixedImageIndexes () const |
|
virtual const bool & | GetUseFixedImageSamplesIntensityThreshold () const |
|
virtual const bool & | GetUseSequentialSampling () const |
|
virtual void | Initialize () |
|
virtual void | MultiThreadingInitialize () |
|
void | SetFixedImageIndexes (const FixedImageIndexContainer &indexes) |
|
virtual void | SetFixedImageRegion (const FixedImageRegionType reg) |
|
void | SetFixedImageSamplesIntensityThreshold (const FixedImagePixelType &thresh) |
|
virtual void | SetInterpolator (InterpolatorType *_arg) |
|
void | SetNumberOfSpatialSamples (SizeValueType num) |
|
virtual void | SetTransform (TransformType *_arg) |
|
void | SetTransformParameters (const ParametersType ¶meters) const |
|
void | SetUseAllPixels (bool useAllPixels) |
|
void | SetUseFixedImageIndexes (bool useIndexes) |
|
void | SetUseFixedImageSamplesIntensityThreshold (bool useThresh) |
|
void | SetUseSequentialSampling (bool useSequential) |
|
void | UseAllPixelsOff () |
|
void | UseAllPixelsOn () |
|
virtual void | SetFixedImage (const FixedImageType *_arg) |
|
virtual const FixedImageType * | GetFixedImage () const |
|
virtual void | SetMovingImage (const MovingImageType *_arg) |
|
virtual const MovingImageType * | GetMovingImage () const |
|
virtual void | SetMovingImageMask (const MovingImageMaskType *_arg) |
|
virtual const MovingImageMaskType * | GetMovingImageMask () const |
|
virtual void | SetFixedImageMask (const FixedImageMaskType *_arg) |
|
virtual const FixedImageMaskType * | GetFixedImageMask () const |
|
void | SetNumberOfWorkUnits (ThreadIdType numberOfThreads) |
|
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
|
virtual void | SetComputeGradient (bool _arg) |
|
virtual const bool & | GetComputeGradient () const |
|
virtual void | ComputeGradientOn () |
|
virtual void | SetNumberOfFixedImageSamples (SizeValueType numSamples) |
|
virtual const SizeValueType & | GetNumberOfFixedImageSamples () const |
|
void | ReinitializeSeed () |
|
void | ReinitializeSeed (int seed) |
|
virtual void | SetUseCachingOfBSplineWeights (bool _arg) |
|
virtual const bool & | GetUseCachingOfBSplineWeights () const |
|
virtual void | UseCachingOfBSplineWeightsOn () |
|
virtual MultiThreaderType * | GetModifiableThreader () |
|
const TransformPointer * | GetThreaderTransform () |
|
virtual void | GetDerivative (const ParametersType ¶meters, DerivativeType &derivative) const =0 |
|
const char * | GetNameOfClass () const override |
|
virtual MeasureType | GetValue (const ParametersType ¶meters) const =0 |
|
virtual void | GetValueAndDerivative (const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const |
|
const char * | GetNameOfClass () const override |
|
virtual unsigned int | GetNumberOfParameters () const=0 |
|
unsigned long | AddObserver (const EventObject &event, Command *) |
|
unsigned long | AddObserver (const EventObject &event, Command *) const |
|
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
|
LightObject::Pointer | CreateAnother () const override |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary () |
|
const MetaDataDictionary & | GetMetaDataDictionary () const |
|
virtual ModifiedTimeType | GetMTime () const |
|
const char * | GetNameOfClass () const override |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
void | Register () const override |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetReferenceCount (int) override |
|
void | UnRegister () const noexcept override |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
|
virtual void | SetObjectName (std::string _arg) |
|
virtual const std::string & | GetObjectName () const |
|
Pointer | Clone () const |
|
virtual Pointer | CreateAnother () const |
|
virtual void | Delete () |
|
virtual const char * | GetNameOfClass () const |
|
virtual int | GetReferenceCount () const |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
virtual void | Register () const |
|
virtual void | SetReferenceCount (int) |
|
virtual void | UnRegister () const noexcept |
|
|
MeasureType | EvaluateMeasure (HistogramType &histogram) const override |
|
void | FormTrainingHistogram () |
|
|
| KullbackLeiblerCompareHistogramImageToImageMetric () |
|
| ~KullbackLeiblerCompareHistogramImageToImageMetric () override=default |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
MeasureType | EvaluateMeasure (HistogramType &histogram) const override=0 |
|
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 |
|
virtual MeasureType | EvaluateMeasure (HistogramType &histogram) const =0 |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| 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, bool) const |
|
virtual void | GetValueAndDerivativeThreadPreProcess (ThreadIdType, bool) const |
|
virtual bool | GetValueAndDerivativeThreadProcessSample (ThreadIdType, SizeValueType, const MovingImagePointType &, double, const ImageDerivativesType &) const |
|
| ImageToImageMetric () |
|
virtual void | PreComputeTransformValues () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
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, bool) const |
|
virtual bool | GetValueThreadProcessSample (ThreadIdType, SizeValueType, const MovingImagePointType &, double) const |
|
virtual void | GetValueThreadPostProcess (ThreadIdType, bool) const |
|
| SingleValuedCostFunction ()=default |
|
| ~SingleValuedCostFunction () override |
|
| CostFunctionTemplate ()=default |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| ~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 | PrintSelf (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|