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

itkGradientRecursiveGaussianImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGradientRecursiveGaussianImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/06/19 16:41:17 $
00007   Version:   $Revision: 1.34 $
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 __itkGradientRecursiveGaussianImageFilter_h
00018 #define __itkGradientRecursiveGaussianImageFilter_h
00019 
00020 #include "itkRecursiveGaussianImageFilter.h"
00021 #include "itkNthElementImageAdaptor.h"
00022 #include "itkImage.h"
00023 #include "itkCovariantVector.h"
00024 #include "itkPixelTraits.h"
00025 #include "itkProgressAccumulator.h"
00026 
00027 
00028 namespace itk
00029 {
00030 
00042 // NOTE that the ITK_TYPENAME macro has to be used here in lieu 
00043 // of "typename" because VC++ doesn't like the typename keyword 
00044 // on the defaults of template parameters
00045 template <typename TInputImage, 
00046           typename TOutputImage= Image< CovariantVector< 
00047   ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00048   ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00049                                         ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00050 class ITK_EXPORT GradientRecursiveGaussianImageFilter:
00051     public ImageToImageFilter<TInputImage,TOutputImage>
00052 {
00053 public:
00055   typedef GradientRecursiveGaussianImageFilter  Self;
00056   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00057   typedef SmartPointer<Self>                   Pointer;
00058   typedef SmartPointer<const Self>        ConstPointer;
00059   
00060   
00062   typedef TInputImage                                    InputImageType;
00063   typedef typename TInputImage::PixelType                PixelType;
00064   typedef typename NumericTraits<PixelType>::RealType    RealType;
00065 
00066 
00068   itkStaticConstMacro(ImageDimension, unsigned int,
00069                       TInputImage::ImageDimension);
00070 
00075   typedef float                                            InternalRealType;
00076   typedef Image<InternalRealType, 
00077                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00078 
00079 
00080 
00081 
00086   typedef NthElementImageAdaptor< TOutputImage,
00087                                   InternalRealType >  OutputImageAdaptorType;
00088   typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00089 
00091   typedef RecursiveGaussianImageFilter<
00092     RealImageType,
00093     RealImageType
00094     >    GaussianFilterType;
00095 
00097   typedef RecursiveGaussianImageFilter<
00098     InputImageType,
00099     RealImageType
00100     >    DerivativeFilterType;
00101 
00102 
00104   typedef typename GaussianFilterType::Pointer    GaussianFilterPointer;
00105 
00107   typedef typename DerivativeFilterType::Pointer  DerivativeFilterPointer;
00108 
00110   typedef typename TOutputImage::Pointer          OutputImagePointer;                                  
00111 
00112 
00114   typedef TOutputImage      OutputImageType;
00115   typedef typename          OutputImageType::PixelType      OutputPixelType;
00116   typedef typename PixelTraits<OutputPixelType>::ValueType  OutputComponentType;
00117 
00119   itkNewMacro(Self);
00120 
00122   void SetSigma( RealType sigma );
00123 
00125   void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00126   itkGetMacro( NormalizeAcrossScale, bool );
00127 
00133   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00134 
00135 protected:
00136   GradientRecursiveGaussianImageFilter();
00137   virtual ~GradientRecursiveGaussianImageFilter() {};
00138   void PrintSelf(std::ostream& os, Indent indent) const;
00139   
00141   void GenerateData( void );
00142 
00143   // Override since the filter produces the entire dataset
00144   void EnlargeOutputRequestedRegion(DataObject *output);
00145 
00146 private:
00147   GradientRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00148   void operator=(const Self&); //purposely not implemented
00149   
00150   GaussianFilterPointer         m_SmoothingFilters[ImageDimension-1];
00151   DerivativeFilterPointer       m_DerivativeFilter;
00152   OutputImageAdaptorPointer     m_ImageAdaptor;
00153 
00155   bool m_NormalizeAcrossScale; 
00156 
00157 };
00158 
00159 } // end namespace itk
00160 
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkGradientRecursiveGaussianImageFilter.txx"
00163 #endif
00164 
00165 #endif
00166 
00167 
00168 
00169 

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