ITK  5.2.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  * 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 {
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
49 template <typename TInputImage, typename TOutputImage = TInputImage>
51  : public InPlaceImageFilter<TInputImage, TOutputImage>
52 {
53 public:
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 
96  using OutputImagePointer = typename TOutputImage::Pointer;
97 
99  using OutputImageType = TOutputImage;
100  using OutputPixelType = typename OutputImageType::PixelType;
101 
106 
108  itkNewMacro(Self);
109 
112 
114  void
115  SetSigma(RealType sigma);
116  RealType
117  GetSigma();
119 
123  void
124  SetNormalizeAcrossScale(bool normalize);
125  itkGetConstMacro(NormalizeAcrossScale, bool);
127 
128  void
129  SetNumberOfWorkUnits(ThreadIdType nb) override;
130 
131 #ifdef ITK_USE_CONCEPT_CHECKING
132  // Begin concept checking
133  itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<PixelType>));
134  // End concept checking
135 #endif
136 
137 protected:
139  ~GradientMagnitudeRecursiveGaussianImageFilter() override = default;
140  void
141  PrintSelf(std::ostream & os, Indent indent) const override;
142 
144  void
145  GenerateData() override;
146 
153  void
154  GenerateInputRequestedRegion() override;
155 
159  void
160  EnlargeOutputRequestedRegion(DataObject * output) override;
161 
162 private:
165 
166  GaussianFilterPointer m_SmoothingFilters[ImageDimension - 1];
170 
173 };
174 } // end namespace itk
175 
176 #ifndef ITK_MANUAL_INSTANTIATION
177 # include "itkGradientMagnitudeRecursiveGaussianImageFilter.hxx"
178 #endif
179 
180 #endif
itk::GradientMagnitudeRecursiveGaussianImageFilter::m_SqrSpacingFilter
SqrSpacingFilterPointer m_SqrSpacingFilter
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:168
itkRecursiveGaussianImageFilter.h
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:714
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itkNthElementImageAdaptor.h
itk::InPlaceImageFilter
Base class for filters that take an image as input and overwrite that image as the output.
Definition: itkInPlaceImageFilter.h:77
itk::GradientMagnitudeRecursiveGaussianImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:100
itk::GradientMagnitudeRecursiveGaussianImageFilter::RealType
typename NumericTraits< PixelType >::RealType RealType
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:69
itk::GradientMagnitudeRecursiveGaussianImageFilter::m_DerivativeFilter
DerivativeFilterPointer m_DerivativeFilter
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:167
itkImage.h
itk::BinaryGeneratorImageFilter
Implements pixel-wise generic operation of two images, or of an image and a constant.
Definition: itkBinaryGeneratorImageFilter.h:56
itkSqrtImageFilter.h
itkPixelTraits.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GradientMagnitudeRecursiveGaussianImageFilter::m_NormalizeAcrossScale
bool m_NormalizeAcrossScale
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:172
itk::SqrtImageFilter
Computes the square root of each pixel.
Definition: itkSqrtImageFilter.h:71
itkBinaryGeneratorImageFilter.h
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::GradientMagnitudeRecursiveGaussianImageFilter::DerivativeFilterPointer
typename DerivativeFilterType::Pointer DerivativeFilterPointer
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:91
itk::GradientMagnitudeRecursiveGaussianImageFilter::SqrSpacingFilterPointer
typename SqrSpacingFilterType::Pointer SqrSpacingFilterPointer
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:164
itk::GradientMagnitudeRecursiveGaussianImageFilter
Computes the Magnitude of the Gradient of an image by convolution with the first derivative of a Gaus...
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:50
itk::GradientMagnitudeRecursiveGaussianImageFilter::SqrtFilterPointer
typename SqrtFilterType::Pointer SqrtFilterPointer
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:93
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::GradientMagnitudeRecursiveGaussianImageFilter::InternalRealType
float InternalRealType
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:75
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::GradientMagnitudeRecursiveGaussianImageFilter::PixelType
typename InputImageType::PixelType PixelType
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:64
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::GradientMagnitudeRecursiveGaussianImageFilter::GaussianFilterPointer
typename GaussianFilterType::Pointer GaussianFilterPointer
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:88
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::GradientMagnitudeRecursiveGaussianImageFilter::m_SqrtFilter
SqrtFilterPointer m_SqrtFilter
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:169
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::RecursiveGaussianImageFilter
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
Definition: itkRecursiveGaussianImageFilter.h:100
itk::GradientMagnitudeRecursiveGaussianImageFilter::CumulativeImagePointer
typename CumulativeImageType::Pointer CumulativeImagePointer
Definition: itkGradientMagnitudeRecursiveGaussianImageFilter.h:105
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293