ITK  6.0.0
Insight Toolkit
itkZeroCrossingBasedEdgeDetectionImageFilter.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 itkZeroCrossingBasedEdgeDetectionImageFilter_h
19#define itkZeroCrossingBasedEdgeDetectionImageFilter_h
20
22#include "itkImage.h"
23
24namespace itk
25{
74template <typename TInputImage, typename TOutputImage>
76 : public ImageToImageFilter<TInputImage, TOutputImage>
77{
78public:
79 ITK_DISALLOW_COPY_AND_MOVE(ZeroCrossingBasedEdgeDetectionImageFilter);
80
84
86 using InputImageType = TInputImage;
87 using OutputImageType = TOutputImage;
88
92
94 using InputImagePixelType = typename TInputImage::PixelType;
95 using OutputImagePixelType = typename TOutputImage::PixelType;
96
98 itkNewMacro(Self);
99
102
104 itkOverrideGetNameOfClassMacro(ZeroCrossingBasedEdgeDetectionImageFilter);
105
107 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
108 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
109
112
114 itkSetMacro(Variance, ArrayType);
115 itkGetConstMacro(Variance, const ArrayType);
116 itkSetMacro(MaximumError, ArrayType);
117 itkGetConstMacro(MaximumError, const ArrayType);
121 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
122 itkSetMacro(BackgroundValue, OutputImagePixelType);
123 itkGetConstMacro(ForegroundValue, OutputImagePixelType);
124 itkSetMacro(ForegroundValue, OutputImagePixelType);
128 void
130 {
131 m_Variance.Fill(v);
132 }
133
140 void
142 {
143 m_MaximumError.Fill(v);
144 }
145
146#ifdef ITK_USE_CONCEPT_CHECKING
147 // Begin concept checking
152 itkConceptMacro(PixelTypeIsFloatingPointCheck, (Concept::IsFloatingPoint<InputImagePixelType>));
153 // End concept checking
154#endif
155
156protected:
158
160 void
161 PrintSelf(std::ostream & os, Indent indent) const override;
162
169 void
170 GenerateData() override;
171
172private:
174 ArrayType m_Variance{};
175
178 ArrayType m_MaximumError{};
179
180 OutputImagePixelType m_BackgroundValue{};
181 OutputImagePixelType m_ForegroundValue{};
182};
183} // end of namespace itk
184
185#ifndef ITK_MANUAL_INSTANTIATION
186# include "itkZeroCrossingBasedEdgeDetectionImageFilter.hxx"
187#endif
188
189#endif
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::PixelType InputImagePixelType
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...
This filter implements a zero-crossing based edge detector.
~ZeroCrossingBasedEdgeDetectionImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....