#include <itkHausdorffDistanceImageFilter.h>
Computes the Hausdorff distance between the set of non-zero pixels of two images.
HausdorffDistanceImageFilter computes the distance between the set non-zero pixels of two images using the following formula:
\[ H(A,B) = \max(h(A,B),h(B,A)) \]
where
\[ h(A,B) = \max_{a \in A} \min_{b \in B} \| a - b\| \]
is the directed Hausdorff distance and \(A\) and \(B\) are respectively the set of non-zero pixels in the first and second input images.
In particular, this filter uses the DirectedHausdorffImageFilter inside to compute the two directed distances and then select the largest of the two.
The Hausdorff distance measures the degree of mismatch between two sets and behaves like a metric over the set of all closed bounded sets - with properties of identity, symmetry and triangle inequality.
This filter requires the largest possible region of the first image and the same corresponding region in the second image. It behaves as filter with two inputs and one output. Thus it can be inserted in a pipeline with other filters. The filter passes the first input through unmodified.
This filter is templated over the two input image types. It assume both images have the same number of dimensions.
Definition at line 63 of file itkHausdorffDistanceImageFilter.h.
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TInputImage1::ImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Attributes | |
RealType | m_AverageHausdorffDistance {} |
RealType | m_HausdorffDistance {} |
bool | m_UseImageSpacing { true } |
Additional Inherited Members | |
![]() | |
using | InputToOutputRegionCopierType |
using | OutputToInputRegionCopierType |
![]() | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
![]() | |
template<typename TSourceObject> | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
![]() | |
bool | m_DynamicMultiThreading { true } |
![]() | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::ConstPointer = SmartPointer<const Self> |
Definition at line 72 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::IndexType = typename TInputImage1::IndexType |
Definition at line 90 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1ConstPointer = typename TInputImage1::ConstPointer |
Definition at line 85 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1PixelType = typename TInputImage1::PixelType |
Definition at line 92 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1Pointer = typename TInputImage1::Pointer |
Definition at line 83 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1Type = TInputImage1 |
Image related type alias.
Definition at line 81 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2ConstPointer = typename TInputImage2::ConstPointer |
Definition at line 86 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2PixelType = typename TInputImage2::PixelType |
Definition at line 93 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2Pointer = typename TInputImage2::Pointer |
Definition at line 84 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2Type = TInputImage2 |
Definition at line 82 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::Pointer = SmartPointer<Self> |
Definition at line 71 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::RealType = typename NumericTraits<InputImage1PixelType>::RealType |
Type to use form computations.
Definition at line 99 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::RegionType = typename TInputImage1::RegionType |
Definition at line 88 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::Self = HausdorffDistanceImageFilter |
Standard Self type alias
Definition at line 69 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::SizeType = typename TInputImage1::SizeType |
Definition at line 89 of file itkHausdorffDistanceImageFilter.h.
using itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::Superclass = ImageToImageFilter<TInputImage1, TInputImage1> |
Definition at line 70 of file itkHausdorffDistanceImageFilter.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
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 |
Give the process object a chance to indicate that it will produce more output than it was requested to produce. For example, many imaging filters must compute the entire output at once or can only produce output in complete slices. Such filters cannot handle smaller requested regions. These filters must provide an implementation of this method, setting the output requested region to the size they will produce. By default, a process object does not modify the size of the output requested region.
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
GenerateData.
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
What is the input requested region that is required to produce the output requested region? By default, the largest possible region is always required but this is overridden in many subclasses. For instance, for an image processing filter where an output pixel is a simple function of an input pixel, the input requested region will be set to the output requested region. For an image processing filter where an output pixel is a function of the pixels in a neighborhood of an input pixel, then the input requested region will need to be larger than the output requested region (to avoid introducing artificial boundary conditions). This function should never request an input region that is outside the the input largest possible region (i.e. implementations of this method should crop the input requested region at the boundaries of the input largest possible region).
Reimplemented from itk::ProcessObject.
|
virtual |
Return the computed Hausdorff distance.
|
virtual |
Return the computed Hausdorff distance.
const InputImage1Type * itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::GetInput1 | ( | ) |
Get the first input.
const InputImage2Type * itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::GetInput2 | ( | ) |
Get the second input.
|
overridevirtual |
Reimplemented from itk::LightObject.
References HausdorffDistanceImageFilter().
|
virtual |
Set if image spacing should be used in computing distances.
|
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::LightObject.
void itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::SetInput1 | ( | const InputImage1Type * | image | ) |
Set the first input.
void itk::HausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::SetInput2 | ( | const InputImage2Type * | image | ) |
Set the second input.
|
virtual |
Set if image spacing should be used in computing distances.
|
staticconstexpr |
Image related type alias.
Definition at line 96 of file itkHausdorffDistanceImageFilter.h.
|
private |
Definition at line 149 of file itkHausdorffDistanceImageFilter.h.
|
private |
Definition at line 148 of file itkHausdorffDistanceImageFilter.h.
|
private |
Definition at line 150 of file itkHausdorffDistanceImageFilter.h.