ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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
63 using OutputImageRegionType = typename TOutputImage::RegionType;
64
67 using SpacingType = typename TOutputImage::SpacingType;
68
71 using PointType = typename TOutputImage::PointType;
72
75 using DirectionType = typename TOutputImage::DirectionType;
76
78 static constexpr unsigned int NDimensions = TOutputImage::ImageDimension;
79
82
84 using SizeType = typename TOutputImage::SizeType;
85 using SizeValueType = typename TOutputImage::SizeValueType;
86
89 using typename Superclass::ParametersType;
90
92 itkOverrideGetNameOfClassMacro(GaussianImageSource);
93
95 itkNewMacro(Self);
96
98
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
126 SetParameters(const ParametersType & parameters) override;
128 GetParameters() const override;
130
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:
148
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
Simulate a standard C array with copy semantics.
typename TOutputImage::PointType PointType
FixedArray< double, Self::NDimensions > ArrayType
void GenerateData() override
typename TOutputImage::RegionType OutputImageRegionType
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
Array< ParametersValueType > ParametersType
ParametricImageSource< TOutputImage > Superclass
void SetParameters(const ParametersType &parameters) override
typename TOutputImage::PixelType OutputImagePixelType
typename TOutputImage::SizeValueType SizeValueType
static constexpr unsigned int NDimensions
typename TOutputImage::SizeType SizeType
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Definition itkIndent.h:50
Array< ParametersValueType > ParametersType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....