ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkMorphologicalSignedDistanceTransformImageFilter.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 itkMorphologicalSignedDistanceTransformImageFilter_h
19#define itkMorphologicalSignedDistanceTransformImageFilter_h
20
22#include "itkProgressReporter.h"
23
28
29namespace itk
30{
69
70template <typename TInputImage, typename TOutputImage = TInputImage>
72 : public ImageToImageFilter<TInputImage, TOutputImage>
73{
74public:
75 ITK_DISALLOW_COPY_AND_MOVE(MorphologicalSignedDistanceTransformImageFilter);
76
82
84 itkNewMacro(Self);
85
87 itkOverrideGetNameOfClassMacro(MorphologicalSignedDistanceTransformImageFilter);
88
90 using InputImageType = TInputImage;
91 using OutputImageType = TOutputImage;
92 using InputPixelType = typename TInputImage::PixelType;
95 using OutputPixelType = typename TOutputImage::PixelType;
96
98 using InputImagePointer = typename TInputImage::Pointer;
99 using InputImageConstPointer = typename TInputImage::ConstPointer;
100
102 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
103 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
104 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
105
108
109 virtual void
110 Modified() const;
111
116 itkGetConstReferenceMacro(OutsideValue, InputPixelType);
117
119 itkBooleanMacro(UseImageSpacing);
120
123 itkSetMacro(InsideIsPositive, bool);
124
127 itkGetConstReferenceMacro(InsideIsPositive, bool);
128
132 itkBooleanMacro(InsideIsPositive);
134 void
136 {
137 m_Erode->SetUseImageSpacing(uis);
138 m_Dilate->SetUseImageSpacing(uis);
139 this->Modified();
140 }
141
143 {
144 NOCHOICE = 0, // decices based on scale - experimental
145 CONTACTPOINT = 1, // sometimes faster at low scale
146 INTERSECTION = 2 // default
147 };
148
155
157 itkGetConstReferenceMacro(ParabolicAlgorithm, int);
158
159 const bool &
161 {
162 return m_Erode->GetUseImageSpacing();
163 }
164
165 static_assert(InputImageDimension == OutputImageDimension);
166
168
169protected:
172 void
173 PrintSelf(std::ostream & os, Indent indent) const;
174
176 void
178
180
181 // do everything in the output image type, which should have high precision
186
187private:
190 typename ErodeType::Pointer m_Erode;
191 typename DilateType::Pointer m_Dilate;
192 typename ThreshType::Pointer m_Thresh;
193 typename HelperType::Pointer m_Helper;
194};
195} // namespace itk
196#ifndef ITK_MANUAL_INSTANTIATION
197# include "itkMorphologicalSignedDistanceTransformImageFilter.hxx"
198#endif
199
200#endif
Binarize an input image by thresholding.
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Definition itkIndent.h:53
Implements a pixel-wise operator to form a signed distance transform.
typename itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
typename NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
typename itk::ParabolicErodeImageFilter< OutputImageType, OutputImageType > ErodeType
typename itk::MorphSDTHelperImageFilter< OutputImageType, OutputImageType > HelperType
void PrintSelf(std::ostream &os, Indent indent) const
typename itk::BinaryThresholdImageFilter< InputImageType, OutputImageType > ThreshType
typename itk::ParabolicDilateImageFilter< OutputImageType, OutputImageType > DilateType
Class for morphological dilation operations with parabolic structuring elements.
Class for morphological erosion operations with parabolic structuring elements.
Implements transparent reference counting.
#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)