ITK  6.0.0
Insight Toolkit
itkFFTDiscreteGaussianImageFilter.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 itkFFTDiscreteGaussianImageFilter_h
19 #define itkFFTDiscreteGaussianImageFilter_h
20 
23 #include "itkImage.h"
24 #include "itkMacro.h"
25 #include "ITKSmoothingExport.h"
26 
27 namespace itk
28 {
34 {
35 public:
51  enum class KernelSource : uint8_t
52  {
53  OPERATORS = 0,
55  };
56 };
57 // Define how to print enumeration
58 extern ITKSmoothing_EXPORT std::ostream &
59  operator<<(std::ostream & out, const FFTDiscreteGaussianImageFilterEnums::KernelSource value);
60 
81 template <typename TInputImage, typename TOutputImage = TInputImage>
82 class ITK_TEMPLATE_EXPORT FFTDiscreteGaussianImageFilter : public DiscreteGaussianImageFilter<TInputImage, TOutputImage>
83 {
84 public:
85  ITK_DISALLOW_COPY_AND_MOVE(FFTDiscreteGaussianImageFilter);
86 
92 
94  itkNewMacro(Self);
95 
97  itkOverrideGetNameOfClassMacro(FFTDiscreteGaussianImageFilter);
98 
100  using InputImageType = typename Superclass::InputImageType;
101  using OutputImageType = typename Superclass::OutputImageType;
102 
105  using OutputPixelType = typename Superclass::OutputPixelType;
106  using OutputInternalPixelType = typename Superclass::OutputInternalPixelType;
107  using InputPixelType = typename Superclass::InputPixelType;
108  using InputInternalPixelType = typename Superclass::InputInternalPixelType;
109 
111  using InputPixelValueType = typename Superclass::InputPixelValueType;
112  using OutputPixelValueType = typename Superclass::OutputPixelValueType;
113 
116  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
117 
119  using typename Superclass::RealOutputPixelType;
120  using typename Superclass::RealOutputImageType;
121  using typename Superclass::RealOutputPixelValueType;
124 
126  using typename Superclass::BoundaryConditionType;
127  using typename Superclass::InputDefaultBoundaryConditionType;
128  using typename Superclass::RealBoundaryConditionPointerType;
129  using typename Superclass::RealDefaultBoundaryConditionType;
130 
132  using typename Superclass::ArrayType;
133  using typename Superclass::SigmaArrayType;
134  using typename Superclass::ScalarRealType;
135 
137  using typename Superclass::KernelType;
138  using typename Superclass::RadiusType;
139 
142 
145  void
146  SetInputBoundaryCondition(BoundaryConditionType *) override;
147 
150 
151  itkGetConstMacro(KernelImage, typename RealImageType::Pointer);
152 
153 protected:
154  FFTDiscreteGaussianImageFilter() = default;
155  ~FFTDiscreteGaussianImageFilter() override = default;
156 
158  void
159  GenerateInputRequestedRegion() override;
160 
166  void
167  GenerateData() override;
168 
171  auto
172  GenerateKernelImage() -> RealImageType *;
173 
174 private:
175  /* Enum for choosing among available kernel generation methods */
178 
179  /* Kernel image is allocated with GenerateKernelImage() */
180  typename RealImageType::Pointer m_KernelImage{};
181 
182  /* Persist mini-pipeline filter to minimize construction costs
183  * on repeated calls to GenerateData() */
185 };
186 } // end namespace itk
187 
188 #ifndef ITK_MANUAL_INSTANTIATION
189 # include "itkFFTDiscreteGaussianImageFilter.hxx"
190 #endif
191 
192 #endif
itk::FFTDiscreteGaussianImageFilter::RealPixelType
RealOutputPixelType RealPixelType
Definition: itkFFTDiscreteGaussianImageFilter.h:122
itk::DiscreteGaussianImageFilter
Blurs an image by separable convolution with discrete gaussian kernels. This filter performs Gaussian...
Definition: itkDiscreteGaussianImageFilter.h:64
KernelSource
itk::FFTConvolutionImageFilter
Convolve a given image with an arbitrary image kernel using multiplication in the Fourier domain.
Definition: itkFFTConvolutionImageFilter.h:60
itk::DiscreteGaussianImageFilter::InputInternalPixelType
typename TInputImage::InternalPixelType InputInternalPixelType
Definition: itkDiscreteGaussianImageFilter.h:90
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:216
itkFFTConvolutionImageFilter.h
itkImage.h
itk::SmartPointer< Self >
itk::FFTDiscreteGaussianImageFilterEnums::KernelSource
KernelSource
Definition: itkFFTDiscreteGaussianImageFilter.h:51
itk::DiscreteGaussianImageFilter::OutputPixelValueType
typename NumericTraits< OutputPixelType >::ValueType OutputPixelValueType
Definition: itkDiscreteGaussianImageFilter.h:94
itk::ImageBoundaryCondition
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
Definition: itkImageBoundaryCondition.h:52
itk::DiscreteGaussianImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkDiscreteGaussianImageFilter.h:87
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::FFTDiscreteGaussianImageFilterEnums
Contains all enum classes used by FFTDiscreteGaussianImageFilter class.
Definition: itkFFTDiscreteGaussianImageFilter.h:33
itkMacro.h
itk::DiscreteGaussianImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkDiscreteGaussianImageFilter.h:89
itk::FFTDiscreteGaussianImageFilterEnums::KernelSource::IMAGE_SOURCE
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::FFTDiscreteGaussianImageFilter
Blurs an image by convolution with a discrete gaussian kernel in the frequency domain.
Definition: itkFFTDiscreteGaussianImageFilter.h:82
itk::FFTDiscreteGaussianImageFilterEnums::KernelSource::OPERATORS
itk::DiscreteGaussianImageFilter::RealOutputPixelType
typename NumericTraits< OutputPixelType >::RealType RealOutputPixelType
Definition: itkDiscreteGaussianImageFilter.h:101
itk::DiscreteGaussianImageFilter::OutputInternalPixelType
typename TOutputImage::InternalPixelType OutputInternalPixelType
Definition: itkDiscreteGaussianImageFilter.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:139
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
New
static Pointer New()
itkDiscreteGaussianImageFilter.h
itk::DiscreteGaussianImageFilter::InputPixelValueType
typename NumericTraits< InputPixelType >::ValueType InputPixelValueType
Definition: itkDiscreteGaussianImageFilter.h:93
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90