ITK  6.0.0
Insight Toolkit
itkDanielssonDistanceMapImageFilter.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 itkDanielssonDistanceMapImageFilter_h
19#define itkDanielssonDistanceMapImageFilter_h
20
23
24namespace itk
25{
58template <typename TInputImage, typename TOutputImage, typename TVoronoiImage = TInputImage>
59class ITK_TEMPLATE_EXPORT DanielssonDistanceMapImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
60{
61public:
62 ITK_DISALLOW_COPY_AND_MOVE(DanielssonDistanceMapImageFilter);
63
69
71
73 itkNewMacro(Self);
74
76 itkOverrideGetNameOfClassMacro(DanielssonDistanceMapImageFilter);
77
79 using InputImageType = TInputImage;
80
82 using InputPixelType = typename InputImageType::PixelType;
83
86
89
91 using OffsetType = typename InputImageType::OffsetType;
92
94 using SpacingType = typename InputImageType::SpacingType;
95 using SpacingValueType = typename InputImageType::SpacingValueType;
96
99
102
105 using OutputImageType = TOutputImage;
106
108 using OutputPixelType = typename OutputImageType::PixelType;
109
110 using VoronoiImageType = TVoronoiImage;
112 using VoronoiPixelType = typename VoronoiImageType::PixelType;
113
115 static constexpr unsigned int InputImageDimension = InputImageType::ImageDimension;
116
119
122
125
128
130 itkSetMacro(SquaredDistance, bool);
131 itkGetConstReferenceMacro(SquaredDistance, bool);
132 itkBooleanMacro(SquaredDistance);
140 itkSetMacro(InputIsBinary, bool);
141 itkGetConstReferenceMacro(InputIsBinary, bool);
142 itkBooleanMacro(InputIsBinary);
146 itkSetMacro(UseImageSpacing, bool);
147 itkGetConstReferenceMacro(UseImageSpacing, bool);
148 itkBooleanMacro(UseImageSpacing);
158
169
173
176 using Superclass::MakeOutput;
179
180#ifdef ITK_USE_CONCEPT_CHECKING
181 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
182 static constexpr unsigned int VoronoiImageDimension = TVoronoiImage::ImageDimension;
183
184 // Begin concept checking
187 itkConceptMacro(DoubleConvertibleToOutputCheck, (Concept::Convertible<double, OutputPixelType>));
189 // End concept checking
190#endif
191
192protected:
195 void
196 PrintSelf(std::ostream & os, Indent indent) const override;
197
199 void
200 GenerateData() override;
201
203 void
205
207 void
209
211 void
213
214private:
215 bool m_SquaredDistance{};
216 bool m_InputIsBinary{};
217 bool m_UseImageSpacing{ true };
218
219 SpacingType m_InputSpacingCache{};
220};
221} // end namespace itk
222
223#ifndef ITK_MANUAL_INSTANTIATION
224# include "itkDanielssonDistanceMapImageFilter.hxx"
225#endif
226
227#endif
This filter computes the distance map of the input image as an approximation with pixel accuracy to t...
VectorImageType * GetVectorDistanceMap()
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
typename VoronoiImageType::Pointer VoronoiImagePointer
~DanielssonDistanceMapImageFilter() override=default
typename InputImageType::SpacingType SpacingType
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::SpacingValueType SpacingValueType
void UpdateLocalDistance(VectorImageType *, const IndexType &, const OffsetType &)
typename VoronoiImageType::PixelType VoronoiPixelType
SmartPointer< Self > Pointer
Base class for all process objects that output image data.
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Superclass::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::Pointer InputImagePointer
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86