ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkMorphologicalDistanceTransformImageFilter.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 itkMorphologicalDistanceTransformImageFilter_h
19#define itkMorphologicalDistanceTransformImageFilter_h
20
22#include "itkProgressReporter.h"
23
26#include "itkSqrtImageFilter.h"
27
28namespace itk
29{
57
58template <typename TInputImage, typename TOutputImage = TInputImage>
60 : public ImageToImageFilter<TInputImage, TOutputImage>
61{
62public:
63 ITK_DISALLOW_COPY_AND_MOVE(MorphologicalDistanceTransformImageFilter);
64
70
72 itkNewMacro(Self);
73
75 itkOverrideGetNameOfClassMacro(MorphologicalDistanceTransformImageFilter);
76
78 using InputImageType = TInputImage;
79 using OutputImageType = TOutputImage;
80 using InputPixelType = typename TInputImage::PixelType;
83 using OutputPixelType = typename TOutputImage::PixelType;
84
86 using InputImagePointer = typename TInputImage::Pointer;
87 using InputImageConstPointer = typename TInputImage::ConstPointer;
88
90 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
91 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
92 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
93
96 void
97 Modified() const override;
98
103 itkGetConstReferenceMacro(OutsideValue, InputPixelType);
104
106 void
108 {
109 m_Erode->SetUseImageSpacing(uis);
110 }
111
112 const bool &
114 {
115 return m_Erode->GetUseImageSpacing();
116 }
117
118 itkSetMacro(SqrDist, bool);
119 itkGetConstReferenceMacro(SqrDist, bool);
120 itkBooleanMacro(SqrDist);
121
123
125
126protected:
129 void
130 PrintSelf(std::ostream & os, Indent indent) const override;
131
133 void
134 GenerateData() override;
135
136 // do everything in the output image type, which should have high precision
140
141private:
143 typename ErodeType::Pointer m_Erode;
144 typename ThreshType::Pointer m_Thresh;
145 typename SqrtType::Pointer m_Sqrt;
147};
148} // namespace itk
149#ifndef ITK_MANUAL_INSTANTIATION
150# include "itkMorphologicalDistanceTransformImageFilter.hxx"
151#endif
152
153#endif
Binarize an input image by thresholding.
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Definition itkIndent.h:53
typename NumericTraits< InputPixelType >::RealType RealType
void PrintSelf(std::ostream &os, Indent indent) const override
typename itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
typename NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
typename itk::SqrtImageFilter< OutputImageType, OutputImageType > SqrtType
~MorphologicalDistanceTransformImageFilter() override=default
typename itk::BinaryThresholdImageFilter< InputImageType, OutputImageType > ThreshType
typename itk::ParabolicErodeImageFilter< OutputImageType, OutputImageType > ErodeType
Class for morphological erosion operations with parabolic structuring elements.
Implements transparent reference counting.
Computes the square root of each pixel.
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)