#include <itkKappaStatisticImageToImageMetric.h>
Computes similarity between two binary objects to be registered.
This Class is templated over the type of the fixed and moving images to be compared. The metric here is designed for matching pixels in two images with the same exact value. Only one value can be considered (the default is 255) and can be specified with the SetForegroundValue method. In the computation of the metric, only foreground pixels are considered. The metric value is given by 2*|A&B|/(|A|+|B|), where A is the foreground region in the moving image, B is the foreground region in the fixed image, & is intersection, and |.| indicates the area of the enclosed set. The metric is described in "Morphometric Analysis of White Matter Lesions in MR Images: Method and Validation", A. P. Zijdenbos, B. M. Dawant, R. A. Margolin, A. C. Palmer.
This metric is especially useful when considering the similarity between binary images. Given the nature of binary images, a nearest neighbor interpolator is the preferred interpolator.
Metric values range from 0.0 (no foreground alignment) to 1.0 (perfect foreground alignment). When dealing with optimizers that can only minimize a metric, use the ComplementOn() method.
Definition at line 54 of file itkKappaStatisticImageToImageMetric.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 | |
KappaStatisticImageToImageMetric () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~KappaStatisticImageToImageMetric () 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 () |
Private Attributes | |
bool | m_Complement { false } |
RealType | m_ForegroundValue {} |
using itk::KappaStatisticImageToImageMetric< TFixedImage, TMovingImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 63 of file itkKappaStatisticImageToImageMetric.h.
using itk::SingleValuedCostFunction::DerivativeType |
DerivativeType type alias. It defines a type used to return the cost function derivative.
Definition at line 133 of file itkSingleValuedCostFunction.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageConstPointer |
Definition at line 79 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageRegionType |
Definition at line 80 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageType |
Type of the fixed Image.
Definition at line 77 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientImageType |
Definition at line 110 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientPixelType |
Definition at line 109 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::InputPointType |
Definition at line 90 of file itkImageToImageMetric.h.
using itk::SingleValuedCostFunction::MeasureType |
MeasureType type alias. It defines a type used to return the cost function value.
Definition at line 130 of file itkSingleValuedCostFunction.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageConstPointer |
Definition at line 74 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageType |
Type of the moving Image.
Definition at line 72 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::OutputPointType |
Definition at line 91 of file itkImageToImageMetric.h.
using itk::KappaStatisticImageToImageMetric< TFixedImage, TMovingImage >::Pointer = SmartPointer<Self> |
Definition at line 62 of file itkKappaStatisticImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::RealType |
Gaussian filter to compute the gradient of the Moving Image
Definition at line 108 of file itkImageToImageMetric.h.
using itk::KappaStatisticImageToImageMetric< TFixedImage, TMovingImage >::Self = KappaStatisticImageToImageMetric |
Standard class type aliases.
Definition at line 60 of file itkKappaStatisticImageToImageMetric.h.
using itk::KappaStatisticImageToImageMetric< TFixedImage, TMovingImage >::Superclass = ImageToImageMetric<TFixedImage, TMovingImage> |
Definition at line 61 of file itkKappaStatisticImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformJacobianType |
Definition at line 93 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformParametersType |
Definition at line 92 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformPointer |
Definition at line 89 of file itkImageToImageMetric.h.
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformType |
Type of the Transform Base class
Definition at line 87 of file itkImageToImageMetric.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
virtual |
Set/Get whether this metric returns 2*|A&B|/(|A|+|B|) (ComplementOff, the default) or 1.0 - 2*|A&B|/(|A|+|B|) (ComplementOn). When using an optimizer that minimizes metric values use ComplementOn().
|
virtual |
Set/Get whether this metric returns 2*|A&B|/(|A|+|B|) (ComplementOff, the default) or 1.0 - 2*|A&B|/(|A|+|B|) (ComplementOn). When using an optimizer that minimizes metric values use ComplementOn().
|
overridevirtual |
Computes the gradient image and assigns it to m_GradientImage
Reimplemented from itk::ImageToImageMetric< TFixedImage, TMovingImage >.
|
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.
|
virtual |
Set/Get whether this metric returns 2*|A&B|/(|A|+|B|) (ComplementOff, the default) or 1.0 - 2*|A&B|/(|A|+|B|) (ComplementOn). When using an optimizer that minimizes metric values use ComplementOn().
|
override |
Get the derivatives of the match measure.
|
virtual |
This method allows the user to set the foreground value. The default value is 255.
|
overridevirtual |
Reimplemented from itk::ImageToImageMetric< TFixedImage, TMovingImage >.
References KappaStatisticImageToImageMetric().
|
override |
Get the value of the metric at a particular parameter setting. The metric value is given by 2*|A&B|/(|A|+|B|), where A is the moving image, B is the fixed image, & is intersection, and |.| indicates the area of the enclosed set. If ComplementOn has been set, the metric value is 1.0-2*|A&B|/(|A|+|B|).
|
override |
Get both the value and derivative. This method internally calls the GetValue()
and the GetDerivative()
method.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ImageToImageMetric< TFixedImage, TMovingImage >.
|
virtual |
Set/Get whether this metric returns 2*|A&B|/(|A|+|B|) (ComplementOff, the default) or 1.0 - 2*|A&B|/(|A|+|B|) (ComplementOn). When using an optimizer that minimizes metric values use ComplementOn().
|
virtual |
This method allows the user to set the foreground value. The default value is 255.
|
private |
Definition at line 136 of file itkKappaStatisticImageToImageMetric.h.
|
private |
Definition at line 135 of file itkKappaStatisticImageToImageMetric.h.