00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGaussianImageSource_h
00018 #define __itkGaussianImageSource_h
00019
00020 #include "itkImageSource.h"
00021 #include "itkFixedArray.h"
00022 #include "itkSize.h"
00023
00024 namespace itk
00025 {
00026
00042 template <typename TOutputImage>
00043 class ITK_EXPORT GaussianImageSource : public ImageSource<TOutputImage>
00044 {
00045 public:
00047 typedef GaussianImageSource Self;
00048 typedef ImageSource<TOutputImage> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 typedef typename TOutputImage::PixelType OutputImagePixelType;
00054
00056 typedef typename TOutputImage::RegionType OutputImageRegionType;
00057
00060 typedef typename TOutputImage::SpacingType SpacingType;
00061
00064 typedef typename TOutputImage::PointType PointType;
00065
00067 itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension);
00068
00070 typedef FixedArray<double, itkGetStaticConstMacro(NDimensions)> ArrayType;
00071
00073 typedef Size<itkGetStaticConstMacro(NDimensions)> SizeType;
00074
00076 itkTypeMacro(GaussianImageSource,ImageSource);
00077
00079 itkNewMacro(Self);
00080
00082 virtual void SetSize( const unsigned long* values);
00083
00085 virtual void SetSize( const SizeType values);
00086
00088 itkGetVectorMacro(Size,const unsigned long,NDimensions);
00089
00091 virtual void SetSpacing( const SpacingType& values);
00092 virtual void SetSpacing( const float* values);
00093 virtual void SetSpacing( const double* values);
00095
00097 itkGetMacro(Spacing,const SpacingType);
00098
00100 virtual void SetOrigin( const PointType& values);
00101 virtual void SetOrigin( const float* values);
00102 virtual void SetOrigin( const double* values);
00104
00106 itkGetMacro(Origin,PointType);
00107
00109 itkSetMacro(Scale, double);
00110 itkGetMacro(Scale, double);
00111 itkSetMacro(Normalized, bool);
00112 itkGetMacro(Normalized, bool);
00113 itkSetMacro(Sigma, ArrayType);
00114 itkGetMacro(Sigma, ArrayType);
00115 itkSetMacro(Mean, ArrayType);
00116 itkGetMacro(Mean, ArrayType);
00118
00119
00120 protected:
00121 GaussianImageSource();
00122 ~GaussianImageSource();
00123 void PrintSelf(std::ostream& os, Indent indent) const;
00124 void GenerateData();
00125 virtual void GenerateOutputInformation();
00126
00127 private:
00128 GaussianImageSource(const GaussianImageSource&);
00129 void operator=(const GaussianImageSource&);
00130
00131 unsigned long m_Size[NDimensions];
00132 SpacingType m_Spacing;
00133 PointType m_Origin;
00134
00138 ArrayType m_Sigma;
00139
00141 ArrayType m_Mean;
00142
00144 double m_Scale;
00145
00147 bool m_Normalized;
00148 };
00149
00150 }
00151
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkGaussianImageSource.txx"
00154 #endif
00155
00156 #endif
00157