ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGradientMagnitudeRecursiveGaussianImageFilter.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 itkGradientMagnitudeRecursiveGaussianImageFilter_h
19 #define itkGradientMagnitudeRecursiveGaussianImageFilter_h
20 
22 #include "itkImage.h"
23 #include "itkPixelTraits.h"
25 #include "itkSqrtImageFilter.h"
27 
28 namespace itk
29 {
45 // NOTE that the typename macro has to be used here in lieu
46 // of "typename" because VC++ doesn't like the typename keyword
47 // on the defaults of template parameters
48 template< typename TInputImage,
49  typename TOutputImage = TInputImage >
51  public InPlaceImageFilter< TInputImage, TOutputImage >
52 {
53 public:
54  ITK_DISALLOW_COPY_AND_ASSIGN(GradientMagnitudeRecursiveGaussianImageFilter);
55 
61 
63  using InputImageType = TInputImage;
64  using PixelType = typename InputImageType::PixelType;
65 
67  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
68 
70 
75  using InternalRealType = float;
77  Self::ImageDimension >;
78 
82 
86 
89 
92 
95 
97 
99  using OutputImagePointer = typename TOutputImage::Pointer;
100 
102  using OutputImageType = TOutputImage;
103  using OutputPixelType = typename OutputImageType::PixelType;
104 
108  Self::ImageDimension >;
110 
112  itkNewMacro(Self);
113 
117 
119  void SetSigma(RealType sigma);
120  RealType GetSigma();
122 
126  void SetNormalizeAcrossScale(bool normalizeInScaleSpace);
127  itkGetConstMacro(NormalizeAcrossScale, bool);
129 
130  void SetNumberOfWorkUnits(ThreadIdType nb) override;
131 
132 #ifdef ITK_USE_CONCEPT_CHECKING
133  // Begin concept checking
134  itkConceptMacro( InputHasNumericTraitsCheck,
136  // End concept checking
137 #endif
138 
139 protected:
141  ~GradientMagnitudeRecursiveGaussianImageFilter() override = default;
142  void PrintSelf(std::ostream & os, Indent indent) const override;
143 
145  void GenerateData() override;
146 
153  void GenerateInputRequestedRegion() override;
154 
158  void EnlargeOutputRequestedRegion(DataObject *output) override;
159 
160 private:
161 
164 
165  GaussianFilterPointer m_SmoothingFilters[ImageDimension - 1];
169 
172 };
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkGradientMagnitudeRecursiveGaussianImageFilter.hxx"
177 #endif
178 
179 #endif
Computes the Magnitude of the Gradient of an image by convolution with the first derivative of a Gaus...
typename OutputImageType::Pointer OutputImagePointer
Define numeric traits for std::vector.
Computes the square root of each pixel.
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
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.
Implements pixel-wise generic operation of two images, or of an image and a constant.
TOutputImage OutputImageType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for filters that take an image as input and overwrite that image as the output...
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75