ITK  6.0.0
Insight Toolkit
itkHausdorffDistanceImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkHausdorffDistanceImageFilter_h
19#define itkHausdorffDistanceImageFilter_h
20
22#include "itkNumericTraits.h"
23
24namespace itk
25{
62template <typename TInputImage1, typename TInputImage2>
63class ITK_TEMPLATE_EXPORT HausdorffDistanceImageFilter : public ImageToImageFilter<TInputImage1, TInputImage1>
64{
65public:
66 ITK_DISALLOW_COPY_AND_MOVE(HausdorffDistanceImageFilter);
67
73
75 itkNewMacro(Self);
76
78 itkOverrideGetNameOfClassMacro(HausdorffDistanceImageFilter);
79
81 using InputImage1Type = TInputImage1;
82 using InputImage2Type = TInputImage2;
87
91
92 using InputImage1PixelType = typename TInputImage1::PixelType;
93 using InputImage2PixelType = typename TInputImage2::PixelType;
94
96 static constexpr unsigned int ImageDimension = TInputImage1::ImageDimension;
97
100
102 void
104
106 void
108
110 const InputImage1Type *
112
114 const InputImage2Type *
116
118 itkSetMacro(UseImageSpacing, bool);
119 itkGetConstMacro(UseImageSpacing, bool);
123 itkGetConstMacro(HausdorffDistance, RealType);
124 itkGetConstMacro(AverageHausdorffDistance, RealType);
127#ifdef ITK_USE_CONCEPT_CHECKING
128 // Begin concept checking
130 // End concept checking
131#endif
132
133protected:
135 ~HausdorffDistanceImageFilter() override = default;
136 void
137 PrintSelf(std::ostream & os, Indent indent) const override;
138
140 void
141 GenerateData() override;
142
143 // Override since the filter needs all the data for the algorithm
144 void
146
147 // Override since the filter produces all of its output
148 void
150
151private:
152 RealType m_HausdorffDistance{};
153 RealType m_AverageHausdorffDistance{};
154 bool m_UseImageSpacing{ true };
155}; // end of class
156} // end namespace itk
157
158#ifndef ITK_MANUAL_INSTANTIATION
159# include "itkHausdorffDistanceImageFilter.hxx"
160#endif
161
162#endif
Base class for all data objects in ITK.
Computes the Hausdorff distance between the set of non-zero pixels of two images.
typename TInputImage2::ConstPointer InputImage2ConstPointer
typename TInputImage2::PixelType InputImage2PixelType
typename TInputImage1::Pointer InputImage1Pointer
void SetInput1(const InputImage1Type *image)
typename TInputImage2::Pointer InputImage2Pointer
typename TInputImage1::IndexType IndexType
typename NumericTraits< InputImage1PixelType >::RealType RealType
void PrintSelf(std::ostream &os, Indent indent) const override
const InputImage2Type * GetInput2()
typename TInputImage1::RegionType RegionType
typename TInputImage1::ConstPointer InputImage1ConstPointer
void GenerateInputRequestedRegion() override
const InputImage1Type * GetInput1()
void EnlargeOutputRequestedRegion(DataObject *data) override
void SetInput2(const InputImage2Type *image)
~HausdorffDistanceImageFilter() override=default
typename TInputImage1::PixelType InputImage1PixelType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....