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: 2008-07-31 09:14:58 $
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 __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 
00026 
00027 namespace itk
00028 {
00029 
00042 template <typename TInputImage, 
00043           typename TOutputImage= TInputImage >
00044 class ITK_EXPORT SmoothingRecursiveGaussianImageFilter:
00045     public ImageToImageFilter<TInputImage,TOutputImage>
00046 {
00047 public:
00049   typedef SmoothingRecursiveGaussianImageFilter             Self;
00050   typedef ImageToImageFilter<TInputImage,TOutputImage>      Superclass;
00051   typedef SmartPointer<Self>                                Pointer;
00052   typedef SmartPointer<const Self>                          ConstPointer;
00053 
00054   
00056   typedef TInputImage                                       InputImageType;
00057   typedef TOutputImage                                      OutputImageType;
00058   typedef typename TInputImage::PixelType                   PixelType;
00059   typedef typename NumericTraits<PixelType>::RealType       RealType;
00060   typedef typename NumericTraits<PixelType>::ScalarRealType ScalarRealType;
00061 
00062 
00064   itkTypeMacro(SmoothingRecursiveGaussianImageFilter, 
00065                ImageToImageFilter);
00066 
00068   itkStaticConstMacro(ImageDimension, unsigned int,
00069                       TInputImage::ImageDimension);
00070 
00075   typedef typename NumericTraits< PixelType >::FloatType   InternalRealType;
00076   typedef Image<InternalRealType, 
00077                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00078 
00080   typedef RecursiveGaussianImageFilter<
00081     InputImageType,
00082     RealImageType
00083     >    FirstGaussianFilterType;
00084 
00086   typedef RecursiveGaussianImageFilter<
00087     RealImageType,
00088     RealImageType
00089     >    InternalGaussianFilterType;
00090 
00092   typedef CastImageFilter<
00093     RealImageType,
00094     OutputImageType
00095     >    CastingFilterType;
00096 
00097 
00099   typedef typename InternalGaussianFilterType::Pointer    InternalGaussianFilterPointer;
00100 
00102   typedef typename FirstGaussianFilterType::Pointer       FirstGaussianFilterPointer;
00103 
00105   typedef typename CastingFilterType::Pointer             CastingFilterPointer;
00106 
00108   typedef typename OutputImageType::Pointer                  OutputImagePointer;
00109 
00111   itkNewMacro(Self);
00112 
00114   void SetSigma( ScalarRealType sigma );
00115   itkGetMacro(Sigma, ScalarRealType);
00117 
00119   void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00120   itkGetMacro( NormalizeAcrossScale, bool );
00122 
00123   void SetNumberOfThreads( int nb );
00124 
00125 #ifdef ITK_USE_CONCEPT_CHECKING
00126 
00127   itkConceptMacro(InputHasNumericTraitsCheck,
00128                   (Concept::HasNumericTraits<PixelType>));
00129 
00131 #endif
00132 
00133 protected:
00134   SmoothingRecursiveGaussianImageFilter();
00135   virtual ~SmoothingRecursiveGaussianImageFilter() {};
00136   void PrintSelf(std::ostream& os, Indent indent) const;
00137   
00139   void GenerateData( void );
00140 
00146   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00147 
00148   // Override since the filter produces the entire dataset
00149   void EnlargeOutputRequestedRegion(DataObject *output);
00150 
00151 private:
00152   SmoothingRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00153   void operator=(const Self&); //purposely not implemented
00154   
00155   InternalGaussianFilterPointer         m_SmoothingFilters[ImageDimension-1];
00156   FirstGaussianFilterPointer            m_FirstSmoothingFilter;
00157   CastingFilterPointer                  m_CastingFilter;
00158 
00160   bool m_NormalizeAcrossScale; 
00161 
00163   ScalarRealType                        m_Sigma;
00164 };
00165 
00166 } // end namespace itk
00167 
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkSmoothingRecursiveGaussianImageFilter.txx"
00170 #endif
00171 
00172 #endif
00173 

Generated at Thu Nov 6 00:14:45 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000