Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkGaussianImageSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGaussianImageSource.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/07/26 15:06:24 $
00007   Version:   $Revision: 1.15 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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);
00095 
00097   itkGetMacro(Spacing,const SpacingType);
00098 
00100   virtual void SetOrigin( const PointType& values);
00101   virtual void SetOrigin( const float* values);
00102   virtual void SetOrigin( const double* values);
00104 
00106   itkGetMacro(Origin,PointType);
00107 
00109   itkSetMacro(Scale, double);
00110   itkGetMacro(Scale, double);
00111   itkSetMacro(Normalized, bool);
00112   itkGetMacro(Normalized, bool);
00113   itkSetMacro(Sigma, ArrayType);
00114   itkGetMacro(Sigma, ArrayType);
00115   itkSetMacro(Mean, ArrayType);
00116   itkGetMacro(Mean, ArrayType);
00118 
00119 
00120 protected:
00121   GaussianImageSource();
00122   ~GaussianImageSource();
00123   void PrintSelf(std::ostream& os, Indent indent) const;
00124   void GenerateData();
00125   virtual void GenerateOutputInformation();
00126 
00127 private:
00128   GaussianImageSource(const GaussianImageSource&); //purposely not implemented
00129   void operator=(const GaussianImageSource&); //purposely not implemented
00130 
00131   unsigned long  m_Size[NDimensions];    //size of the output image
00132   SpacingType    m_Spacing; //spacing
00133   PointType      m_Origin;  //origin
00134 
00138   ArrayType m_Sigma;
00139 
00141   ArrayType m_Mean;
00142 
00144   double m_Scale;
00145 
00147   bool m_Normalized;
00148 };
00149 
00150 } // end namespace itk
00151 
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkGaussianImageSource.txx"
00154 #endif
00155 
00156 #endif
00157 

Generated at Mon Mar 12 00:26:25 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000