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
00023 namespace itk
00024 {
00025
00041 template <typename TOutputImage>
00042 class ITK_EXPORT GaussianImageSource : public ImageSource<TOutputImage>
00043 {
00044 public:
00046 typedef GaussianImageSource Self;
00047 typedef ImageSource<TOutputImage> Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 typedef typename TOutputImage::PixelType OutputImagePixelType;
00053
00055 typedef typename TOutputImage::RegionType OutputImageRegionType;
00056
00058 itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension);
00059
00061 typedef FixedArray<double, itkGetStaticConstMacro(NDimensions)> ArrayType;
00062
00064 itkTypeMacro(GaussianImageSource,ImageSource);
00065
00067 itkNewMacro(Self);
00068
00070 virtual void SetSize( const unsigned long values[NDimensions]);
00071
00073 itkGetVectorMacro(Size,const unsigned long,NDimensions);
00074
00076 virtual void SetSpacing( const float values[NDimensions]);
00077 virtual void SetSpacing( const double values[NDimensions]);
00078
00080 itkGetVectorMacro(Spacing,const double,NDimensions);
00081
00083 virtual void SetOrigin( const float values[NDimensions]);
00084 virtual void SetOrigin( const double values[NDimensions]);
00085
00087 itkGetVectorMacro(Origin,const double,NDimensions);
00088
00090 itkSetMacro(Scale, double);
00091 itkGetMacro(Scale, double);
00092 itkSetMacro(Normalized, bool);
00093 itkGetMacro(Normalized, bool);
00094 itkSetMacro(Sigma, ArrayType);
00095 itkGetMacro(Sigma, ArrayType);
00096 itkSetMacro(Mean, ArrayType);
00097 itkGetMacro(Mean, ArrayType);
00098
00099
00100 protected:
00101 GaussianImageSource();
00102 ~GaussianImageSource();
00103 void PrintSelf(std::ostream& os, Indent indent) const;
00104 void GenerateData();
00105 virtual void GenerateOutputInformation();
00106
00107 private:
00108 GaussianImageSource(const GaussianImageSource&);
00109 void operator=(const GaussianImageSource&);
00110
00111 unsigned long m_Size[NDimensions];
00112 double m_Spacing[NDimensions];
00113 double m_Origin[NDimensions];
00114
00118 ArrayType m_Sigma;
00119
00121 ArrayType m_Mean;
00122
00124 double m_Scale;
00125
00127 bool m_Normalized;
00128 };
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkGaussianImageSource.txx"
00134 #endif
00135
00136 #endif