ITK  6.0.0
Insight Toolkit
itkZeroCrossingImageFilter.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 itkZeroCrossingImageFilter_h
19#define itkZeroCrossingImageFilter_h
20
22namespace itk
23{
63template <typename TInputImage, typename TOutputImage>
64class ITK_TEMPLATE_EXPORT ZeroCrossingImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
65{
66public:
67 ITK_DISALLOW_COPY_AND_MOVE(ZeroCrossingImageFilter);
73
75 using InputImageType = TInputImage;
76 using OutputImageType = TOutputImage;
77
81
83 using InputImagePixelType = typename TInputImage::PixelType;
84 using OutputImagePixelType = typename TOutputImage::PixelType;
85
87 itkNewMacro(Self);
88
91
93 itkOverrideGetNameOfClassMacro(ZeroCrossingImageFilter);
94
96 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
97 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
98
107 void
109
111 itkSetMacro(ForegroundValue, OutputImagePixelType);
112 itkGetConstMacro(ForegroundValue, OutputImagePixelType);
116 itkSetMacro(BackgroundValue, OutputImagePixelType);
117 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
120#ifdef ITK_USE_CONCEPT_CHECKING
121 // Begin concept checking
126 // End concept checking
127#endif
128
129protected:
131 ~ZeroCrossingImageFilter() override = default;
132 void
133 PrintSelf(std::ostream & os, Indent indent) const override;
134
135 OutputImagePixelType m_BackgroundValue{};
136 OutputImagePixelType m_ForegroundValue{};
137
149 void
150 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
151};
152} // end of namespace itk
155#ifndef ITK_MANUAL_INSTANTIATION
156# include "itkZeroCrossingImageFilter.hxx"
157#endif
158
159#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 finds the closest pixel to the zero-crossings (sign changes) in a signed itk::Image.
void PrintSelf(std::ostream &os, Indent indent) const override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
~ZeroCrossingImageFilter() override=default
void GenerateInputRequestedRegion() override
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....