ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkFastChamferDistanceImageFilter.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 itkFastChamferDistanceImageFilter_h
19#define itkFastChamferDistanceImageFilter_h
20
22#include "itkNarrowBand.h"
23
24namespace itk
25{
56
57template <typename TInputImage, typename TOutputImage>
58class ITK_TEMPLATE_EXPORT FastChamferDistanceImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
59{
60public:
61 ITK_DISALLOW_COPY_AND_MOVE(FastChamferDistanceImageFilter);
62
68
70 itkNewMacro(Self);
71
73 itkOverrideGetNameOfClassMacro(FastChamferDistanceImageFilter);
74
76 using InputImageType = TInputImage;
77
79 using OutputImageType = TOutputImage;
80
82 using RegionType = typename InputImageType::RegionType;
83
85 using PixelType = typename InputImageType::PixelType;
86
88 using IndexType = typename RegionType::IndexType;
89
91 using OffsetType = typename InputImageType::OffsetType;
92
94 using SizeType = typename RegionType::SizeType;
95
97 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
98 static constexpr unsigned int OutputImageDimension = OutputImageType::ImageDimension;
99
101 using InputImagePointer = typename InputImageType::ConstPointer;
102
107
109
112 itkSetMacro(Weights, WeightsType);
113 itkGetConstReferenceMacro(Weights, WeightsType);
117 itkSetMacro(MaximumDistance, float);
118 itkGetConstMacro(MaximumDistance, float);
121 void
123
126
127 void
129
132
135 itkConceptMacro(FloatConvertibleToPixelTypeCheck, (Concept::Convertible<float, PixelType>));
136 itkConceptMacro(PixelTypeConvertibleToFloatCheck, (Concept::Convertible<PixelType, float>));
137 itkConceptMacro(PixelTypeGreaterThanFloatCheck, (Concept::GreaterThanComparable<PixelType, float>));
139 itkConceptMacro(PixelTypeFloatAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType, float, float>));
140 itkConceptMacro(FloatGreaterThanPixelTypeCheck, (Concept::GreaterThanComparable<float, PixelType>));
142
143protected:
146 void
147 PrintSelf(std::ostream & os, Indent indent) const override;
148
151 void
153
156 void
157 GenerateData() override;
158
159private:
161
164
166
169}; // end of FastChamferDistanceImageFilter class
170} // end namespace itk
171
172#ifndef ITK_MANUAL_INSTANTIATION
173# include "itkFastChamferDistanceImageFilter.hxx"
174#endif
175
176#endif
NarrowBandPointer GetNarrowBand() const
~FastChamferDistanceImageFilter() override=default
RegionType GetRegionToProcess() const
void SetNarrowBand(NarrowBandType *ptr)
void SetRegionToProcess(const RegionType &r)
void PrintSelf(std::ostream &os, Indent indent) const override
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Definition itkIndent.h:50
Narrow Band class.
SmartPointer< Self > Pointer
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....