ITK  6.0.0
Insight Toolkit
itkGradientMagnitudeRecursiveGaussianImageFilter.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 itkGradientMagnitudeRecursiveGaussianImageFilter_h
19#define itkGradientMagnitudeRecursiveGaussianImageFilter_h
20
22#include "itkImage.h"
23#include "itkPixelTraits.h"
25#include "itkSqrtImageFilter.h"
27
28namespace itk
29{
46// NOTE that the typename macro has to be used here in lieu
47// of "typename" because VC++ doesn't like the typename keyword
48// on the defaults of template parameters
49template <typename TInputImage, typename TOutputImage = TInputImage>
51 : public InPlaceImageFilter<TInputImage, TOutputImage>
52{
53public:
54 ITK_DISALLOW_COPY_AND_MOVE(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
80
83
86
89
92
94
97
99 using OutputImageType = TOutputImage;
100 using OutputPixelType = typename OutputImageType::PixelType;
101
106
108 itkNewMacro(Self);
109
111 itkOverrideGetNameOfClassMacro(GradientMagnitudeRecursiveGaussianImageFilter);
112
114 void
124 void
125 SetNormalizeAcrossScale(bool normalize);
126 itkGetConstMacro(NormalizeAcrossScale, bool);
127 itkBooleanMacro(NormalizeAcrossScale);
130 void
132
133#ifdef ITK_USE_CONCEPT_CHECKING
134 // Begin concept checking
135 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<PixelType>));
136 // End concept checking
137#endif
138
139protected:
142 void
143 PrintSelf(std::ostream & os, Indent indent) const override;
144
146 void
147 GenerateData() override;
148
155 void
157
161 void
163
164private:
167
168 GaussianFilterPointer m_SmoothingFilters[ImageDimension - 1]{};
169 DerivativeFilterPointer m_DerivativeFilter{};
170 SqrSpacingFilterPointer m_SqrSpacingFilter{};
171 SqrtFilterPointer m_SqrtFilter{};
172
174 bool m_NormalizeAcrossScale{};
175};
176} // end namespace itk
177
178#ifndef ITK_MANUAL_INSTANTIATION
179# include "itkGradientMagnitudeRecursiveGaussianImageFilter.hxx"
180#endif
181
182#endif
Implements pixel-wise generic operation of two images, or of an image and a constant.
Base class for all data objects in ITK.
Computes the Magnitude of the Gradient of an image by convolution with the first derivative of a Gaus...
void SetNumberOfWorkUnits(ThreadIdType nb) override
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *output) override
Templated n-dimensional image class.
Definition: itkImage.h:89
Base class for filters that take an image as input and overwrite that image as the output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
Computes the square root of each pixel.
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
Definition: itkIntTypes.h:102