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
00068 typedef typename TOutputImage::DirectionType DirectionType;
00069
00071 itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension);
00072
00074 typedef FixedArray<double, itkGetStaticConstMacro(NDimensions)> ArrayType;
00075
00077 typedef Size<itkGetStaticConstMacro(NDimensions)> SizeType;
00078
00080 itkTypeMacro(GaussianImageSource,ImageSource);
00081
00083 itkNewMacro(Self);
00084
00086 virtual void SetSize( const unsigned long* values);
00087
00089 virtual void SetSize( const SizeType values);
00090
00092 itkGetVectorMacro(Size,const unsigned long,NDimensions);
00093
00095 itkSetMacro(Spacing, SpacingType);
00096 virtual void SetSpacing( const float* values);
00097 virtual void SetSpacing( const double* values);
00099
00101 itkGetConstReferenceMacro(Spacing,SpacingType);
00102
00104 itkSetMacro(Origin, PointType);
00105 virtual void SetOrigin( const float* values);
00106 virtual void SetOrigin( const double* values);
00108
00110 itkGetConstReferenceMacro(Origin,PointType);
00111
00113 itkSetMacro(Direction, DirectionType);
00114 itkGetConstReferenceMacro(Direction, DirectionType);
00116
00118 itkSetMacro(Scale, double);
00119 itkGetConstReferenceMacro(Scale, double);
00120 itkSetMacro(Normalized, bool);
00121 itkGetConstReferenceMacro(Normalized, bool);
00122 itkSetMacro(Sigma, ArrayType);
00123 itkGetConstReferenceMacro(Sigma, ArrayType);
00124 itkSetMacro(Mean, ArrayType);
00125 itkGetConstReferenceMacro(Mean, ArrayType);
00127
00128
00129 protected:
00130 GaussianImageSource();
00131 ~GaussianImageSource();
00132 void PrintSelf(std::ostream& os, Indent indent) const;
00133 void GenerateData();
00134 virtual void GenerateOutputInformation();
00135
00136 private:
00137 GaussianImageSource(const GaussianImageSource&);
00138 void operator=(const GaussianImageSource&);
00139
00140 unsigned long m_Size[NDimensions];
00141 SpacingType m_Spacing;
00142 PointType m_Origin;
00143 DirectionType m_Direction;
00144
00148 ArrayType m_Sigma;
00149
00151 ArrayType m_Mean;
00152
00154 double m_Scale;
00155
00157 bool m_Normalized;
00158 };
00159
00160 }
00161
00162 #ifndef ITK_MANUAL_INSTANTIATION
00163 #include "itkGaussianImageSource.txx"
00164 #endif
00165
00166 #endif
00167