ITK  6.0.0
Insight Toolkit
itkSmoothingRecursiveGaussianImageFilter.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
19#ifndef itkSmoothingRecursiveGaussianImageFilter_h
20#define itkSmoothingRecursiveGaussianImageFilter_h
21
23#include "itkCastImageFilter.h"
24#include "itkImage.h"
25#include "itkPixelTraits.h"
26#include "itkCommand.h"
27
28namespace itk
29{
30
49template <typename TInputImage, typename TOutputImage = TInputImage>
50class ITK_TEMPLATE_EXPORT SmoothingRecursiveGaussianImageFilter : public InPlaceImageFilter<TInputImage, TOutputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(SmoothingRecursiveGaussianImageFilter);
54
60
62 using InputImageType = TInputImage;
63 using OutputImageType = TOutputImage;
64 using PixelType = typename TInputImage::PixelType;
67
69 itkOverrideGetNameOfClassMacro(SmoothingRecursiveGaussianImageFilter);
70
72 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
73
76
81 using RealImageType = typename InputImageType::template Rebind<InternalRealType>::Type;
82
85
88
91
94
97
100
103
105 itkNewMacro(Self);
106
111 void
113 void
120
124 GetSigma() const;
125
130 void
131 SetNormalizeAcrossScale(bool normalize);
132 itkGetConstMacro(NormalizeAcrossScale, bool);
133 itkBooleanMacro(NormalizeAcrossScale);
137 void
139
140 bool
141 CanRunInPlace() const override;
142
143#ifdef ITK_USE_CONCEPT_CHECKING
144 // Begin concept checking
145 // This concept does not work with variable length vector images
146 // itkConceptMacro( InputHasNumericTraitsCheck,
147 //( Concept::HasNumericTraits< PixelType > ) );
148 // End concept checking
149#endif
150
151protected:
154 void
155 PrintSelf(std::ostream & os, Indent indent) const override;
156
157 void
158 GenerateData() override;
159
166 void
168
169 // Override since the filter produces the entire dataset
170 void
172
173private:
174 InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension - 1]{};
175 FirstGaussianFilterPointer m_FirstSmoothingFilter{};
176 CastingFilterPointer m_CastingFilter{};
177
178 bool m_NormalizeAcrossScale{ false };
179
180 SigmaArrayType m_Sigma{};
181};
182} // end namespace itk
183
184#ifndef ITK_MANUAL_INSTANTIATION
185# include "itkSmoothingRecursiveGaussianImageFilter.hxx"
186#endif
187
188#endif
Casts input pixels to output pixel type.
Base class for all data objects in ITK.
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 smoothing of an image by convolution with the Gaussian kernels implemented as IIR filter...
void SetNumberOfWorkUnits(ThreadIdType nb) override
typename NumericTraits< PixelType >::FloatType InternalRealType
~SmoothingRecursiveGaussianImageFilter() override=default
void SetSigma(ScalarRealType sigma)
typename NumericTraits< PixelType >::RealType RealType
void SetSigmaArray(const SigmaArrayType &sigma)
void PrintSelf(std::ostream &os, Indent indent) const override
typename InternalGaussianFilterType::Pointer InternalGaussianFilterPointer
void EnlargeOutputRequestedRegion(DataObject *output) override
typename FirstGaussianFilterType::Pointer FirstGaussianFilterPointer
typename NumericTraits< PixelType >::ScalarRealType ScalarRealType
typename InputImageType::template Rebind< InternalRealType >::Type RealImageType
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
Definition: itkIntTypes.h:102