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

itkSmoothingRecursiveGaussianImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSmoothingRecursiveGaussianImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2010-06-18 05:57:42 $
00007   Version:   $Revision: 1.17 $
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 __itkSmoothingRecursiveGaussianImageFilter_h
00018 #define __itkSmoothingRecursiveGaussianImageFilter_h
00019 
00020 #include "itkRecursiveGaussianImageFilter.h"
00021 #include "itkCastImageFilter.h"
00022 #include "itkImage.h"
00023 #include "itkPixelTraits.h"
00024 #include "itkCommand.h"
00025 #include "itkFixedArray.h"
00026 
00027 
00028 namespace itk
00029 {
00030 
00043 template <typename TInputImage, 
00044           typename TOutputImage= TInputImage >
00045 class ITK_EXPORT SmoothingRecursiveGaussianImageFilter:
00046     public ImageToImageFilter<TInputImage,TOutputImage>
00047 {
00048 public:
00050   typedef SmoothingRecursiveGaussianImageFilter             Self;
00051   typedef ImageToImageFilter<TInputImage,TOutputImage>      Superclass;
00052   typedef SmartPointer<Self>                                Pointer;
00053   typedef SmartPointer<const Self>                          ConstPointer;
00054 
00055   
00057   typedef TInputImage                                       InputImageType;
00058   typedef TOutputImage                                      OutputImageType;
00059   typedef typename TInputImage::PixelType                   PixelType;
00060   typedef typename NumericTraits<PixelType>::RealType       RealType;
00061   typedef typename NumericTraits<PixelType>::ScalarRealType ScalarRealType;
00062 
00063 
00065   itkTypeMacro(SmoothingRecursiveGaussianImageFilter, 
00066                ImageToImageFilter);
00067 
00069   itkStaticConstMacro(ImageDimension, unsigned int,
00070                       TInputImage::ImageDimension);
00071 
00073   typedef FixedArray< ScalarRealType, 
00074           itkGetStaticConstMacro(ImageDimension) > SigmaArrayType;
00075 
00076 
00081   typedef typename NumericTraits< PixelType >::FloatType   InternalRealType;
00082   typedef Image<InternalRealType, 
00083                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00084 
00086   typedef RecursiveGaussianImageFilter<
00087     InputImageType,
00088     RealImageType
00089     >    FirstGaussianFilterType;
00090 
00092   typedef RecursiveGaussianImageFilter<
00093     RealImageType,
00094     RealImageType
00095     >    InternalGaussianFilterType;
00096 
00098   typedef CastImageFilter<
00099     RealImageType,
00100     OutputImageType
00101     >    CastingFilterType;
00102 
00103 
00105   typedef typename InternalGaussianFilterType::Pointer    InternalGaussianFilterPointer;
00106 
00108   typedef typename FirstGaussianFilterType::Pointer       FirstGaussianFilterPointer;
00109 
00111   typedef typename CastingFilterType::Pointer             CastingFilterPointer;
00112 
00114   typedef typename OutputImageType::Pointer                  OutputImagePointer;
00115 
00117   itkNewMacro(Self);
00118 
00123   void SetSigmaArray( const SigmaArrayType & sigmas );
00124   void SetSigma( ScalarRealType sigma );
00125   SigmaArrayType GetSigmaArray() const;
00126   ScalarRealType GetSigma() const;
00128 
00130   void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00131   itkGetConstMacro( NormalizeAcrossScale, bool );
00133 
00134   void SetNumberOfThreads( int nb );
00135 
00136 #ifdef ITK_USE_CONCEPT_CHECKING
00137 
00138   itkConceptMacro(InputHasNumericTraitsCheck,
00139                   (Concept::HasNumericTraits<PixelType>));
00140 
00142 #endif
00143 
00144 protected:
00145   SmoothingRecursiveGaussianImageFilter();
00146   virtual ~SmoothingRecursiveGaussianImageFilter() {};
00147   void PrintSelf(std::ostream& os, Indent indent) const;
00148   
00150   void GenerateData( void );
00151 
00157   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00158 
00159   // Override since the filter produces the entire dataset
00160   void EnlargeOutputRequestedRegion(DataObject *output);
00161 
00162 private:
00163   SmoothingRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00164   void operator=(const Self&); //purposely not implemented
00165   
00166   InternalGaussianFilterPointer         m_SmoothingFilters[ImageDimension-1];
00167   FirstGaussianFilterPointer            m_FirstSmoothingFilter;
00168   CastingFilterPointer                  m_CastingFilter;
00169 
00171   bool m_NormalizeAcrossScale; 
00172 
00174   SigmaArrayType                        m_Sigma;
00175 };
00176 
00177 } // end namespace itk
00178 
00179 #ifndef ITK_MANUAL_INSTANTIATION
00180 #include "itkSmoothingRecursiveGaussianImageFilter.txx"
00181 #endif
00182 
00183 #endif
00184 

Generated at Mon Jul 12 2010 19:55:11 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000