ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkZeroCrossingBasedEdgeDetectionImageFilter.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 itkZeroCrossingBasedEdgeDetectionImageFilter_h
19 #define itkZeroCrossingBasedEdgeDetectionImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
69 template< typename TInputImage, typename TOutputImage >
71  public ImageToImageFilter< TInputImage, TOutputImage >
72 {
73 public:
74  ITK_DISALLOW_COPY_AND_ASSIGN(ZeroCrossingBasedEdgeDetectionImageFilter);
75 
79 
81  using InputImageType = TInputImage;
82  using OutputImageType = TOutputImage;
83 
87 
89  using InputImagePixelType = typename TInputImage::PixelType;
90  using OutputImagePixelType = typename TOutputImage::PixelType;
91 
93  itkNewMacro(Self);
94 
97 
100 
102  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
103  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
104 
107 
109  itkSetMacro(Variance, ArrayType);
110  itkGetConstMacro(Variance, const ArrayType);
111  itkSetMacro(MaximumError, ArrayType);
112  itkGetConstMacro(MaximumError, const ArrayType);
114 
116  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
117  itkSetMacro(BackgroundValue, OutputImagePixelType);
118  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
119  itkSetMacro(ForegroundValue, OutputImagePixelType);
121 
123  void SetVariance(const typename ArrayType::ValueType v)
124  {
125  m_Variance.Fill(v);
126  }
127 
134  void SetMaximumError(const typename ArrayType::ValueType v)
135  {
136  m_MaximumError.Fill(v);
137  }
138 
139 #ifdef ITK_USE_CONCEPT_CHECKING
140  // Begin concept checking
141  itkConceptMacro( OutputEqualityComparableCheck,
143  itkConceptMacro( SameDimensionCheck,
145  itkConceptMacro( SameTypeCheck,
147  itkConceptMacro( OutputOStreamWritableCheck,
149  itkConceptMacro( PixelTypeIsFloatingPointCheck,
151  // End concept checking
152 #endif
153 
154 protected:
156  {
157  m_Variance.Fill(1.0);
158  m_MaximumError.Fill(0.01);
161  }
162 
163  ~ZeroCrossingBasedEdgeDetectionImageFilter() override = default;
164  void PrintSelf(std::ostream & os, Indent indent) const override;
165 
172  void GenerateData() override;
173 
174 private:
177 
181 
184 };
185 } //end of namespace itk
186 
187 #ifndef ITK_MANUAL_INSTANTIATION
188 #include "itkZeroCrossingBasedEdgeDetectionImageFilter.hxx"
189 #endif
190 
191 #endif
Define numeric traits for std::vector.
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
This filter implements a zero-crossing based edge detecor.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)