ITK  4.9.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 >
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 
69  typedef typename TOutputImage::PointType PointType;
70 
73  typedef typename TOutputImage::DirectionType DirectionType;
74 
76  itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension);
77 
80 
82  typedef typename TOutputImage::SizeType SizeType;
84 
88 
91 
93  itkNewMacro(Self);
94 
96  itkSetMacro(Scale, double);
97  itkGetConstReferenceMacro(Scale, double);
98  itkSetMacro(Normalized, bool);
99  itkGetConstReferenceMacro(Normalized, bool);
100  itkSetMacro(Sigma, ArrayType);
101  itkGetConstReferenceMacro(Sigma, ArrayType);
102  itkSetMacro(Mean, ArrayType);
103  itkGetConstReferenceMacro(Mean, ArrayType);
105 
111  virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
112  virtual ParametersType GetParameters() const ITK_OVERRIDE;
114 
118  virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE;
119 
120 protected:
122  // ~GaussianImageSource(); default implementation ok
123  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
124 
125  virtual void GenerateData() ITK_OVERRIDE;
126 
127 private:
128  GaussianImageSource(const GaussianImageSource &) ITK_DELETE_FUNCTION;
129  void operator=(const GaussianImageSource &) ITK_DELETE_FUNCTION;
130 
135 
138 
140  double m_Scale;
141 
144 };
145 } // end namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 #include "itkGaussianImageSource.hxx"
149 #endif
150 
151 #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
virtual void PrintSelf(std::ostream &os, Indent indent) const override
TOutputImage::SizeType SizeType
TOutputImage::SpacingType SpacingType
virtual ParametersType GetParameters() const override
Array< ParametersValueType > ParametersType
Base class for all parametric image sources.
static const unsigned int NDimensions
SmartPointer< const Self > ConstPointer
FixedArray< double, itkGetStaticConstMacro(NDimensions) > ArrayType
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual unsigned int GetNumberOfParameters() const override
virtual void GenerateData() override
TOutputImage::PointType PointType
TOutputImage::DirectionType DirectionType
virtual void SetParameters(const ParametersType &parameters) override
Superclass::ParametersValueType ParametersValueType