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: 2002/09/11 19:39:01 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) 2002 Insight 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 
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 
00058   itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension);
00059 
00061   typedef FixedArray<double, itkGetStaticConstMacro(NDimensions)> ArrayType;
00062 
00064   itkTypeMacro(GaussianImageSource,ImageSource);
00065 
00067   itkNewMacro(Self);
00068   
00070   virtual void SetSize( const unsigned long values[NDimensions]);
00071 
00073   itkGetVectorMacro(Size,const unsigned long,NDimensions);
00074   
00076   virtual void SetSpacing( const float values[NDimensions]);
00077   virtual void SetSpacing( const double values[NDimensions]);
00078   
00080   itkGetVectorMacro(Spacing,const double,NDimensions);
00081 
00083   virtual void SetOrigin( const float values[NDimensions]);
00084   virtual void SetOrigin( const double values[NDimensions]);
00085 
00087   itkGetVectorMacro(Origin,const double,NDimensions);
00088 
00090   itkSetMacro(Scale, double);
00091   itkGetMacro(Scale, double);
00092   itkSetMacro(Normalized, bool);
00093   itkGetMacro(Normalized, bool);
00094   itkSetMacro(Sigma, ArrayType);
00095   itkGetMacro(Sigma, ArrayType);
00096   itkSetMacro(Mean, ArrayType);
00097   itkGetMacro(Mean, ArrayType);
00098   
00099 
00100 protected:
00101   GaussianImageSource();
00102   ~GaussianImageSource();
00103   void PrintSelf(std::ostream& os, Indent indent) const;
00104   void GenerateData();
00105   virtual void GenerateOutputInformation();
00106 
00107 private:
00108   GaussianImageSource(const GaussianImageSource&); //purposely not implemented
00109   void operator=(const GaussianImageSource&); //purposely not implemented
00110 
00111   unsigned long  m_Size[NDimensions];    //size of the output image
00112   double         m_Spacing[NDimensions]; //spacing
00113   double         m_Origin[NDimensions];  //origin
00114 
00118   ArrayType m_Sigma;
00119 
00121   ArrayType m_Mean;
00122 
00124   double m_Scale;
00125 
00127   bool m_Normalized;
00128 };
00129 
00130 } // end namespace itk
00131 
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkGaussianImageSource.txx"
00134 #endif
00135 
00136 #endif

Generated at Fri May 21 01:14:48 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000