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
00059 typedef typename TOutputImage::SpacingType
SpacingType;
00060
00063 typedef typename TOutputImage::PointType
PointType;
00064
00066
itkStaticConstMacro(NDimensions,
unsigned int, TOutputImage::ImageDimension);
00067
00069 typedef FixedArray<double, itkGetStaticConstMacro(NDimensions)> ArrayType;
00070
00072
itkTypeMacro(GaussianImageSource,
ImageSource);
00073
00075
itkNewMacro(
Self);
00076
00078
virtual void SetSize(
const unsigned long values[NDimensions]);
00079
00081
itkGetVectorMacro(
Size,
const unsigned long,NDimensions);
00082
00084
virtual void SetSpacing(
const SpacingType& values);
00085
virtual void SetSpacing(
const float values[NDimensions]);
00086
virtual void SetSpacing(
const double values[NDimensions]);
00087
00089
itkGetMacro(Spacing,
const SpacingType);
00090
00092
virtual void SetOrigin(
const PointType& values);
00093
virtual void SetOrigin(
const float values[NDimensions]);
00094
virtual void SetOrigin(
const double values[NDimensions]);
00095
00097
itkGetMacro(Origin,
PointType);
00098
00100
itkSetMacro(Scale,
double);
00101
itkGetMacro(Scale,
double);
00102
itkSetMacro(Normalized,
bool);
00103
itkGetMacro(Normalized,
bool);
00104
itkSetMacro(Sigma,
ArrayType);
00105
itkGetMacro(Sigma,
ArrayType);
00106
itkSetMacro(Mean,
ArrayType);
00107
itkGetMacro(Mean,
ArrayType);
00108
00109
00110
protected:
00111 GaussianImageSource();
00112 ~GaussianImageSource();
00113
void PrintSelf(std::ostream& os,
Indent indent)
const;
00114
void GenerateData();
00115
virtual void GenerateOutputInformation();
00116
00117
private:
00118 GaussianImageSource(
const GaussianImageSource&);
00119
void operator=(
const GaussianImageSource&);
00120
00121
unsigned long m_Size[NDimensions];
00122
SpacingType m_Spacing;
00123
PointType m_Origin;
00124
00128
ArrayType m_Sigma;
00129
00131
ArrayType m_Mean;
00132
00134
double m_Scale;
00135
00137
bool m_Normalized;
00138 };
00139
00140 }
00141
00142
#ifndef ITK_MANUAL_INSTANTIATION
00143
#include "itkGaussianImageSource.txx"
00144
#endif
00145
00146
#endif