ITK  4.4.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_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 
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 
86  typedef typename Superclass::ParametersValueType ParametersValueType;
87  typedef typename Superclass::ParametersType ParametersType;
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);
112  virtual ParametersType GetParameters() const;
114 
118  virtual unsigned int GetNumberOfParameters() const;
119 
120 protected:
122  // ~GaussianImageSource(); default implementation ok
123  void PrintSelf(std::ostream & os, Indent indent) const;
124 
125  void GenerateData();
126 
127 private:
128  GaussianImageSource(const GaussianImageSource &); //purposely not implemented
129  void operator=(const GaussianImageSource &); //purposely not implemented
130 
131  SizeType m_Size; // size of the output image
132  SpacingType m_Spacing; // spacing
133  PointType m_Origin; // origin
135 
140 
143 
145  double m_Scale;
146 
149 };
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkGaussianImageSource.hxx"
154 #endif
155 
156 #endif
157