itkGaussianImageSource.h
Go to the documentation of this file.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 typename TOutputImage::SizeType SizeType;
00078 typedef typename TOutputImage::SizeValueType SizeValueType;
00079
00081 itkTypeMacro(GaussianImageSource,ImageSource);
00082
00084 itkNewMacro(Self);
00085
00087 virtual void SetSize( const SizeValueType * values);
00088
00090 virtual void SetSize( const SizeType values);
00091
00093 itkGetVectorMacro(Size,const SizeValueType,NDimensions);
00094
00096 itkSetMacro(Spacing, SpacingType);
00097 virtual void SetSpacing( const float* values);
00098 virtual void SetSpacing( const double* values);
00100
00102 itkGetConstReferenceMacro(Spacing,SpacingType);
00103
00105 itkSetMacro(Origin, PointType);
00106 virtual void SetOrigin( const float* values);
00107 virtual void SetOrigin( const double* values);
00109
00111 itkGetConstReferenceMacro(Origin,PointType);
00112
00114 itkSetMacro(Direction, DirectionType);
00115 itkGetConstReferenceMacro(Direction, DirectionType);
00117
00119 itkSetMacro(Scale, double);
00120 itkGetConstReferenceMacro(Scale, double);
00121 itkSetMacro(Normalized, bool);
00122 itkGetConstReferenceMacro(Normalized, bool);
00123 itkSetMacro(Sigma, ArrayType);
00124 itkGetConstReferenceMacro(Sigma, ArrayType);
00125 itkSetMacro(Mean, ArrayType);
00126 itkGetConstReferenceMacro(Mean, ArrayType);
00128
00129
00130 protected:
00131 GaussianImageSource();
00132 ~GaussianImageSource();
00133 void PrintSelf(std::ostream& os, Indent indent) const;
00134 void GenerateData();
00135 virtual void GenerateOutputInformation();
00136
00137 private:
00138 GaussianImageSource(const GaussianImageSource&);
00139 void operator=(const GaussianImageSource&);
00140
00141 SizeValueType m_Size[NDimensions];
00142 SpacingType m_Spacing;
00143 PointType m_Origin;
00144 DirectionType m_Direction;
00145
00149 ArrayType m_Sigma;
00150
00152 ArrayType m_Mean;
00153
00155 double m_Scale;
00156
00158 bool m_Normalized;
00159 };
00160
00161 }
00162
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkGaussianImageSource.txx"
00165 #endif
00166
00167 #endif
00168