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);
00094
00096 itkGetMacro(Spacing,const SpacingType);
00097
00099 virtual void SetOrigin( const PointType& values);
00100 virtual void SetOrigin( const float* values);
00101 virtual void SetOrigin( const double* values);
00102
00104 itkGetMacro(Origin,PointType);
00105
00107 itkSetMacro(Scale, double);
00108 itkGetMacro(Scale, double);
00109 itkSetMacro(Normalized, bool);
00110 itkGetMacro(Normalized, bool);
00111 itkSetMacro(Sigma, ArrayType);
00112 itkGetMacro(Sigma, ArrayType);
00113 itkSetMacro(Mean, ArrayType);
00114 itkGetMacro(Mean, ArrayType);
00115
00116
00117 protected:
00118 GaussianImageSource();
00119 ~GaussianImageSource();
00120 void PrintSelf(std::ostream& os, Indent indent) const;
00121 void GenerateData();
00122 virtual void GenerateOutputInformation();
00123
00124 private:
00125 GaussianImageSource(const GaussianImageSource&);
00126 void operator=(const GaussianImageSource&);
00127
00128 unsigned long m_Size[NDimensions];
00129 SpacingType m_Spacing;
00130 PointType m_Origin;
00131
00135 ArrayType m_Sigma;
00136
00138 ArrayType m_Mean;
00139
00141 double m_Scale;
00142
00144 bool m_Normalized;
00145 };
00146
00147 }
00148
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkGaussianImageSource.txx"
00151 #endif
00152
00153 #endif