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);
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&); //purposely not implemented
00126   void operator=(const GaussianImageSource&); //purposely not implemented
00127 
00128   unsigned long  m_Size[NDimensions];    //size of the output image
00129   SpacingType    m_Spacing; //spacing
00130   PointType      m_Origin;  //origin
00131 
00135   ArrayType m_Sigma;
00136 
00138   ArrayType m_Mean;
00139 
00141   double m_Scale;
00142 
00144   bool m_Normalized;
00145 };
00146 
00147 } // end namespace itk
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkGaussianImageSource.txx"
00151 #endif
00152 
00153 #endif

Generated at Wed May 24 23:10:57 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000