ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGaussianImageSource.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 itkGaussianImageSource_h
19 #define itkGaussianImageSource_h
20 
22 #include "itkFixedArray.h"
23 #include "itkSize.h"
24 
25 namespace itk
26 {
43 template< typename TOutputImage >
44 class ITK_TEMPLATE_EXPORT GaussianImageSource :
45  public ParametricImageSource< TOutputImage >
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(GaussianImageSource);
49 
55 
57  using OutputImageType = TOutputImage;
58 
60  using OutputImagePixelType = typename TOutputImage::PixelType;
61 
64 
67  using SpacingType = typename TOutputImage::SpacingType;
68 
72 
76 
78  static constexpr unsigned int NDimensions = TOutputImage::ImageDimension;
79 
82 
84  using SizeType = typename TOutputImage::SizeType;
86 
88  using ParametersValueType = typename Superclass::ParametersValueType;
89  using ParametersType = typename Superclass::ParametersType;
90 
93 
95  itkNewMacro(Self);
96 
100  itkSetMacro(Scale, double);
101  itkGetConstReferenceMacro(Scale, double);
103 
105  itkSetMacro(Normalized, bool);
106  itkGetConstReferenceMacro(Normalized, bool);
107  itkBooleanMacro(Normalized);
109 
111  itkSetMacro(Sigma, ArrayType);
112  itkGetConstReferenceMacro(Sigma, ArrayType);
114 
116  itkSetMacro(Mean, ArrayType);
117  itkGetConstReferenceMacro(Mean, ArrayType);
119 
125  void SetParameters(const ParametersType & parameters) override;
126  ParametersType GetParameters() const override;
128 
132  unsigned int GetNumberOfParameters() const override;
133 
134 protected:
136  ~GaussianImageSource() override = default;
137  void PrintSelf(std::ostream & os, Indent indent) const override;
138 
139  void GenerateData() override;
140 
141 private:
143 
145 
146  double m_Scale{ 255.0 };
147 
148  bool m_Normalized{ false };
149 };
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkGaussianImageSource.hxx"
154 #endif
155 
156 #endif
typename TOutputImage::SpacingType SpacingType
Generate an n-dimensional image of a Gaussian.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
typename Superclass::ParametersType ParametersType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename Superclass::ParametersValueType ParametersValueType
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename TOutputImage::DirectionType DirectionType
Base class for all parametric image sources.
typename TOutputImage::SizeType SizeType
typename TOutputImage::PointType PointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename TOutputImage::SizeValueType SizeValueType