ITK  5.2.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  * http://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_ASSIGN(ZeroCrossingImageFilter);
68 
72 
74  using InputImageType = TInputImage;
75  using OutputImageType = TOutputImage;
76 
80 
82  using InputImagePixelType = typename TInputImage::PixelType;
83  using OutputImagePixelType = typename TOutputImage::PixelType;
84 
86  itkNewMacro(Self);
87 
90 
93 
95  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
96  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
97 
106  void
107  GenerateInputRequestedRegion() override;
108 
110  itkSetMacro(ForegroundValue, OutputImagePixelType);
111  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
113 
115  itkSetMacro(BackgroundValue, OutputImagePixelType);
116  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
118 
119 #ifdef ITK_USE_CONCEPT_CHECKING
120  // Begin concept checking
121  itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputImagePixelType>));
125  // End concept checking
126 #endif
127 
128 protected:
130  ~ZeroCrossingImageFilter() override = default;
131  void
132  PrintSelf(std::ostream & os, Indent indent) const override;
133 
136 
148  void
149  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
150 };
151 } // end of namespace itk
153 
154 #ifndef ITK_MANUAL_INSTANTIATION
155 # include "itkZeroCrossingImageFilter.hxx"
156 #endif
157 
158 #endif
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:634
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:692
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::ZeroCrossingImageFilter::m_BackgroundValue
OutputImagePixelType m_BackgroundValue
Definition: itkZeroCrossingImageFilter.h:134
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::ZeroCrossingImageFilter::m_ForegroundValue
OutputImagePixelType m_ForegroundValue
Definition: itkZeroCrossingImageFilter.h:135
itk::Concept::Comparable
Definition: itkConceptChecking.h:328
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:304
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90