ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGaborImageSource.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 itkGaborImageSource_h
19 #define itkGaborImageSource_h
20 
21 #include "itkGenerateImageSource.h"
22 #include "itkFixedArray.h"
23 
24 namespace itk
25 {
46 template< typename TOutputImage >
47 class ITK_TEMPLATE_EXPORT GaborImageSource:
48  public GenerateImageSource< TOutputImage >
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_ASSIGN(GaborImageSource);
52 
58 
60  using OutputImageType = TOutputImage;
61  using PixelType = typename OutputImageType::PixelType;
63  using SpacingType = typename OutputImageType::SpacingType;
66 
67  using SizeType = typename RegionType::SizeType;
68 
71 
73  itkNewMacro(Self);
74 
76  static constexpr unsigned int ImageDimension = OutputImageType::ImageDimension;
77 
79  using ArrayType = FixedArray< double,
80  Self::ImageDimension >;
81 
83  itkSetMacro(Sigma, ArrayType);
84  itkGetConstReferenceMacro(Sigma, ArrayType);
86 
88  itkSetMacro(Mean, ArrayType);
89  itkGetConstReferenceMacro(Mean, ArrayType);
91 
93  itkSetMacro(Frequency, double);
94  itkGetConstReferenceMacro(Frequency, double);
96 
99  itkSetMacro(CalculateImaginaryPart, bool);
100  itkGetConstReferenceMacro(CalculateImaginaryPart, bool);
101  itkBooleanMacro(CalculateImaginaryPart);
103 
104 protected:
106  ~GaborImageSource() override = default;
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
109  void GenerateData() override;
110 
111 private:
112  bool m_CalculateImaginaryPart{ false };
113 
114  double m_Frequency{ 0.4 };
115 
117  double m_PhaseOffset{ 0.0 };
118 
120 
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 #include "itkGaborImageSource.hxx"
127 #endif
128 
129 #endif
typename RegionType::SizeType SizeType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Generate an n-dimensional image of a Gabor filter.
Base class for all process objects that output image data.
TOutputImage OutputImageType
typename OutputImageType::SpacingType SpacingType
a Base class for image sources which need to have image size, and other meta-data set...
typename OutputImageType::PointType PointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputImageType::RegionType RegionType
typename OutputImageType::PixelType PixelType
typename OutputImageType::DirectionType DirectionType