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 
21 #include "itkImageToImageFilter.h"
22 namespace itk
23 {
63 template <typename TInputImage, typename TOutputImage>
64 class ITK_TEMPLATE_EXPORT ZeroCrossingImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
65 {
66 public:
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
108  GenerateInputRequestedRegion() override;
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
122  itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputImagePixelType>));
126  // End concept checking
127 #endif
128 
129 protected:
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
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:639
itk::ZeroCrossingImageFilter
This filter finds the closest pixel to the zero-crossings (sign changes) in a signed itk::Image.
Definition: itkZeroCrossingImageFilter.h:64
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Concept::SameDimension
Definition: itkConceptChecking.h:697
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::Concept::Comparable
Definition: itkConceptChecking.h:332
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:307
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90