ITK  4.13.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:
53 
55  typedef TOutputImage OutputImageType;
56 
58  typedef typename TOutputImage::PixelType OutputImagePixelType;
59 
61  typedef typename TOutputImage::RegionType OutputImageRegionType;
62 
65  typedef typename TOutputImage::SpacingType SpacingType;
66 
70 
74 
76  itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension);
77 
80 
82  typedef typename TOutputImage::SizeType SizeType;
84 
86  typedef typename Superclass::ParametersValueType ParametersValueType;
87  typedef typename Superclass::ParametersType ParametersType;
88 
91 
93  itkNewMacro(Self);
94 
98  itkSetMacro(Scale, double);
99  itkGetConstReferenceMacro(Scale, double);
101 
103  itkSetMacro(Normalized, bool);
104  itkGetConstReferenceMacro(Normalized, bool);
105  itkBooleanMacro(Normalized);
107 
109  itkSetMacro(Sigma, ArrayType);
110  itkGetConstReferenceMacro(Sigma, ArrayType);
112 
114  itkSetMacro(Mean, ArrayType);
115  itkGetConstReferenceMacro(Mean, ArrayType);
117 
123  virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
124  virtual ParametersType GetParameters() const ITK_OVERRIDE;
126 
130  virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE;
131 
132 protected:
134  // ~GaussianImageSource(); default implementation ok
135  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
136 
137  virtual void GenerateData() ITK_OVERRIDE;
138 
139 private:
140  ITK_DISALLOW_COPY_AND_ASSIGN(GaussianImageSource);
141 
142  ArrayType m_Sigma;
143 
144  ArrayType m_Mean;
145 
146  double m_Scale;
147 
148  bool m_Normalized;
149 };
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkGaussianImageSource.hxx"
154 #endif
155 
156 #endif
TOutputImage::RegionType OutputImageRegionType
ParametricImageSource< TOutputImage > Superclass
Generate an n-dimensional image of a Gaussian.
Base class for all process objects that output image data.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
TOutputImage::PixelType OutputImagePixelType
TOutputImage::SizeValueType SizeValueType
Superclass::ParametersType ParametersType
TOutputImage::SizeType SizeType
TOutputImage::SpacingType SpacingType
Base class for all parametric image sources.
SmartPointer< const Self > ConstPointer
FixedArray< double, itkGetStaticConstMacro(NDimensions) > ArrayType
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TOutputImage::PointType PointType
TOutputImage::DirectionType DirectionType
Superclass::ParametersValueType ParametersValueType