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: 2009-07-12 10:52:52 $
00007   Version:   $Revision: 1.20 $
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 
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&); //purposely not implemented
00139   void operator=(const GaussianImageSource&); //purposely not implemented
00140 
00141   SizeValueType  m_Size[NDimensions];    //size of the output image
00142   SpacingType    m_Spacing;   //spacing
00143   PointType      m_Origin;    //origin
00144   DirectionType  m_Direction; // direction
00145 
00149   ArrayType m_Sigma;
00150 
00152   ArrayType m_Mean;
00153 
00155   double m_Scale;
00156 
00158   bool m_Normalized;
00159 };
00160 
00161 } // end namespace itk
00162 
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkGaussianImageSource.txx"
00165 #endif
00166 
00167 #endif
00168 

Generated at Mon Jul 12 2010 18:23:53 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000