ITK  6.0.0
Insight Toolkit
itkGaussianImageSource.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 itkGaussianImageSource_h
19#define itkGaussianImageSource_h
20
22#include "itkFixedArray.h"
23#include "itkSize.h"
24
25namespace itk
26{
44template <typename TOutputImage>
45class ITK_TEMPLATE_EXPORT GaussianImageSource : public ParametricImageSource<TOutputImage>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(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
86
88 using typename Superclass::ParametersValueType;
89 using typename Superclass::ParametersType;
90
92 itkOverrideGetNameOfClassMacro(GaussianImageSource);
93
95 itkNewMacro(Self);
96
100 itkSetMacro(Scale, double);
101 itkGetConstReferenceMacro(Scale, double);
105 itkSetMacro(Normalized, bool);
106 itkGetConstReferenceMacro(Normalized, bool);
107 itkBooleanMacro(Normalized);
111 itkSetMacro(Sigma, ArrayType);
112 itkGetConstReferenceMacro(Sigma, ArrayType);
116 itkSetMacro(Mean, ArrayType);
117 itkGetConstReferenceMacro(Mean, ArrayType);
125 void
126 SetParameters(const ParametersType & parameters) override;
128 GetParameters() const override;
134 unsigned int
135 GetNumberOfParameters() const override;
136
137protected:
139 ~GaussianImageSource() override = default;
140 void
141 PrintSelf(std::ostream & os, Indent indent) const override;
142
143 void
144 GenerateData() override;
145
146private:
147 ArrayType m_Sigma{};
148
149 ArrayType m_Mean{};
150
151 double m_Scale{ 255.0 };
152
153 bool m_Normalized{ false };
154};
155} // end namespace itk
156
157#ifndef ITK_MANUAL_INSTANTIATION
158# include "itkGaussianImageSource.hxx"
159#endif
160
161#endif
Array class with size defined at construction time.
Definition: itkArray.h:48
Generate an n-dimensional image of a Gaussian.
typename TOutputImage::PointType PointType
void GenerateData() override
typename TOutputImage::SpacingType SpacingType
unsigned int GetNumberOfParameters() const override
ParametersType GetParameters() const override
~GaussianImageSource() override=default
typename TOutputImage::DirectionType DirectionType
void PrintSelf(std::ostream &os, Indent indent) const override
void SetParameters(const ParametersType &parameters) override
typename TOutputImage::SizeValueType SizeValueType
typename TOutputImage::SizeType SizeType
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Base class for all parametric image sources.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86