ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkDirectedHausdorffDistanceImageFilter.h>
Computes the directed Hausdorff distance between the set of non-zero pixels of two images.
DirectedHausdorffDistanceImageFilter computes the distance between the set non-zero pixels of two images using the following formula:
where and are respectively the set of non-zero pixels in the first and second input images. It identifies the point that is farthest from any point of and measures the distance from to the nearest neighbor in . Note that this function is not symmetric and hence is not a true distance.
In particular, this filter uses the SignedMaurerDistanceMapImageFilter inside to compute distance map from all non-zero pixels in the second image. It then finds the largest distance (in pixels) within the set of all non-zero pixels in the first image. The largest distance is returned by the method GetDirectedHausdorffDistance().
In addition, this filter computes the average Hausdorff distance. This average is defined as the average of all minimum distances with any negative distances set to 0 since they indicate overlapping regions. By definition, the distance map computes the minimum distances. However, since this filter is computed using a signed distance transform, the negative distance values are first set to 0 before calculating the average. The average distance is returned by the method GetAverageHausdorffDistance().
Use HausdorffDistanceImageFilter to compute the full Hausdorff distance.
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 input 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 type. It assume both image have the same number of dimensions.
Definition at line 72 of file itkDirectedHausdorffDistanceImageFilter.h.
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | IndexType = typename TInputImage1::IndexType |
using | InputImage1ConstPointer = typename TInputImage1::ConstPointer |
using | InputImage1PixelType = typename TInputImage1::PixelType |
using | InputImage1Pointer = typename TInputImage1::Pointer |
using | InputImage1Type = TInputImage1 |
using | InputImage2ConstPointer = typename TInputImage2::ConstPointer |
using | InputImage2PixelType = typename TInputImage2::PixelType |
using | InputImage2Pointer = typename TInputImage2::Pointer |
using | InputImage2Type = TInputImage2 |
using | Pointer = SmartPointer< Self > |
using | RealType = typename NumericTraits< InputImage1PixelType >::RealType |
using | RegionType = typename TInputImage1::RegionType |
using | Self = DirectedHausdorffDistanceImageFilter |
using | SizeType = typename TInputImage1::SizeType |
using | Superclass = ImageToImageFilter< TInputImage1, TInputImage1 > |
Public Types inherited from itk::ImageToImageFilter< TInputImage1, TInputImage1 > | |
using | ConstPointer = SmartPointer< const Self > |
using | InputImageConstPointer = typename InputImageType::ConstPointer |
using | InputImagePixelType = typename InputImageType::PixelType |
using | InputImagePointer = typename InputImageType::Pointer |
using | InputImageRegionType = typename InputImageType::RegionType |
using | InputImageType = TInputImage1 |
using | OutputImagePixelType = typename Superclass::OutputImagePixelType |
using | OutputImageRegionType = typename Superclass::OutputImageRegionType |
using | Pointer = SmartPointer< Self > |
using | Self = ImageToImageFilter |
using | Superclass = ImageSource< TInputImage1 > |
Public Types inherited from itk::ImageSource< TInputImage1 > | |
using | ConstPointer = SmartPointer< const Self > |
using | DataObjectIdentifierType = Superclass::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArraySizeType = Superclass::DataObjectPointerArraySizeType |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TInputImage1 |
using | Pointer = SmartPointer< Self > |
using | Self = ImageSource |
using | Superclass = ProcessObject |
Public Types inherited from itk::ProcessObject | |
using | ConstPointer = SmartPointer< const Self > |
using | DataObjectIdentifierType = DataObject::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArray = std::vector< DataObjectPointer > |
using | DataObjectPointerArraySizeType = DataObjectPointerArray::size_type |
using | MultiThreaderType = MultiThreaderBase |
using | NameArray = std::vector< DataObjectIdentifierType > |
using | Pointer = SmartPointer< Self > |
using | Self = ProcessObject |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TInputImage1::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage1, TInputImage1 > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TInputImage1 > | |
static constexpr unsigned int | OutputImageDimension |
Private Types | |
using | CompensatedSummationType = itk::CompensatedSummation< RealType > |
using | DistanceMapPointer = typename DistanceMapType::Pointer |
using | DistanceMapType = Image< RealType, Self::ImageDimension > |
Private Attributes | |
RealType | m_AverageHausdorffDistance |
RealType | m_DirectedHausdorffDistance |
DistanceMapPointer | m_DistanceMap |
Array< RealType > | m_MaxDistance |
Array< IdentifierType > | m_PixelCount |
std::vector < CompensatedSummationType > | m_Sum |
bool | m_UseImageSpacing |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TInputImage1, TInputImage1 > | |
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
Static Protected Member Functions inherited from itk::ImageSource< TInputImage1 > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Protected Attributes inherited from itk::ImageSource< TInputImage1 > | |
bool | m_DynamicMultiThreading |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount |
|
private |
Definition at line 182 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::ConstPointer = SmartPointer< const Self > |
Definition at line 82 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 174 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 173 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::IndexType = typename TInputImage1::IndexType |
Definition at line 100 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1ConstPointer = typename TInputImage1::ConstPointer |
Definition at line 95 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1PixelType = typename TInputImage1::PixelType |
Definition at line 102 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1Pointer = typename TInputImage1::Pointer |
Definition at line 93 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage1Type = TInputImage1 |
Image related type alias.
Definition at line 91 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2ConstPointer = typename TInputImage2::ConstPointer |
Definition at line 96 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2PixelType = typename TInputImage2::PixelType |
Definition at line 103 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2Pointer = typename TInputImage2::Pointer |
Definition at line 94 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::InputImage2Type = TInputImage2 |
Definition at line 92 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::Pointer = SmartPointer< Self > |
Definition at line 81 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::RealType = typename NumericTraits< InputImage1PixelType >::RealType |
Type to use form computations.
Definition at line 109 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::RegionType = typename TInputImage1::RegionType |
Definition at line 98 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::Self = DirectedHausdorffDistanceImageFilter |
Standard Self type alias
Definition at line 79 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::SizeType = typename TInputImage1::SizeType |
Definition at line 99 of file itkDirectedHausdorffDistanceImageFilter.h.
using itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::Superclass = ImageToImageFilter< TInputImage1, TInputImage1 > |
Definition at line 80 of file itkDirectedHausdorffDistanceImageFilter.h.
|
protected |
|
overrideprotecteddefault |
|
overrideprotectedvirtual |
Do final mean and variance computation from data accumulated in threads.
Reimplemented from itk::ImageSource< TInputImage1 >.
|
overrideprotectedvirtual |
Pass the input through unmodified. Do this by Grafting in the AllocateOutputs method.
Reimplemented from itk::ImageSource< TInputImage1 >.
|
overrideprotectedvirtual |
Initialize some accumulators before the threads run.
Reimplemented from itk::ImageSource< TInputImage1 >.
|
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::Object.
|
inlineoverrideprotected |
Definition at line 161 of file itkDirectedHausdorffDistanceImageFilter.h.
|
overrideprotectedvirtual |
Give the process object a chance to indictate 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 |
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 directed Hausdorff distance.
|
virtual |
Return the computed directed Hausdorff distance.
const InputImage1Type* itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::GetInput1 | ( | ) |
Get the first input.
const InputImage2Type* itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::GetInput2 | ( | ) |
Get the second input.
|
virtual |
Runtime information support.
Reimplemented from itk::ImageToImageFilter< TInputImage1, TInputImage1 >.
|
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::ProcessObject.
void itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::SetInput1 | ( | const InputImage1Type * | image | ) |
Set the first input.
void itk::DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >::SetInput2 | ( | const InputImage2Type * | image | ) |
Set the second input.
|
virtual |
Set if image spacing should be used in computing distances.
|
overrideprotected |
Multi-thread version GenerateData.
|
static |
Image related type alias.
Definition at line 106 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 186 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 185 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 177 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 179 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 180 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 183 of file itkDirectedHausdorffDistanceImageFilter.h.
|
private |
Definition at line 187 of file itkDirectedHausdorffDistanceImageFilter.h.