ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkZeroCrossingImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
62 template< typename TInputImage, typename TOutputImage >
63 class ITK_TEMPLATE_EXPORT ZeroCrossingImageFilter:
64  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 GenerateInputRequestedRegion() override;
107 
109  itkSetMacro(ForegroundValue, OutputImagePixelType);
110  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
112 
114  itkSetMacro(BackgroundValue, OutputImagePixelType);
115  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
117 
118 #ifdef ITK_USE_CONCEPT_CHECKING
119  // Begin concept checking
120  itkConceptMacro( OutputEqualityComparableCheck,
122  itkConceptMacro( SameDimensionCheck,
124  itkConceptMacro( InputComparableCheck,
126  itkConceptMacro( OutputOStreamWritableCheck,
128  // End concept checking
129 #endif
130 
131 protected:
133  ~ZeroCrossingImageFilter() override = default;
134  void PrintSelf(std::ostream & os, Indent indent) const override;
135 
138 
150  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
151 
152 };
153 } //end of namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkZeroCrossingImageFilter.hxx"
157 #endif
158 
159 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
This filter finds the closest pixel to the zero-crossings (sign changes) in a signed itk::Image...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)