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: 2007/09/16 15:29:35 $
00007   Version:   $Revision: 1.36 $
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 #include <vector>
00027 
00028 
00029 namespace itk
00030 {
00031 
00043 // NOTE that the ITK_TYPENAME macro has to be used here in lieu 
00044 // of "typename" because VC++ doesn't like the typename keyword 
00045 // on the defaults of template parameters
00046 template <typename TInputImage, 
00047           typename TOutputImage= Image< CovariantVector< 
00048   ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00049   ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00050                                         ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00051 class ITK_EXPORT GradientRecursiveGaussianImageFilter:
00052     public ImageToImageFilter<TInputImage,TOutputImage>
00053 {
00054 public:
00056   typedef GradientRecursiveGaussianImageFilter  Self;
00057   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00058   typedef SmartPointer<Self>                   Pointer;
00059   typedef SmartPointer<const Self>        ConstPointer;
00060 
00061   
00063   typedef TInputImage                                    InputImageType;
00064   typedef typename TInputImage::PixelType                PixelType;
00065   typedef typename NumericTraits<PixelType>::RealType    RealType;
00066 
00067 
00069   itkStaticConstMacro(ImageDimension, unsigned int,
00070                       TInputImage::ImageDimension);
00071 
00076   typedef float                                            InternalRealType;
00077   typedef Image<InternalRealType, 
00078                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00079 
00080 
00081 
00082 
00087   typedef NthElementImageAdaptor< TOutputImage,
00088                                   InternalRealType >  OutputImageAdaptorType;
00089   typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00090 
00092   typedef RecursiveGaussianImageFilter<
00093     RealImageType,
00094     RealImageType
00095     >    GaussianFilterType;
00096 
00098   typedef RecursiveGaussianImageFilter<
00099     InputImageType,
00100     RealImageType
00101     >    DerivativeFilterType;
00102 
00103 
00105   typedef typename GaussianFilterType::Pointer    GaussianFilterPointer;
00106 
00108   typedef typename DerivativeFilterType::Pointer  DerivativeFilterPointer;
00109 
00111   typedef typename TOutputImage::Pointer          OutputImagePointer;                                  
00112 
00113 
00115   typedef TOutputImage      OutputImageType;
00116   typedef typename          OutputImageType::PixelType      OutputPixelType;
00117   typedef typename PixelTraits<OutputPixelType>::ValueType  OutputComponentType;
00118 
00120   itkNewMacro(Self);
00121 
00123   void SetSigma( RealType sigma );
00124 
00126   void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00127   itkGetMacro( NormalizeAcrossScale, bool );
00129 
00135   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00136 
00137 #ifdef ITK_USE_CONCEPT_CHECKING
00138 
00139   itkConceptMacro(InputHasNumericTraitsCheck,
00140                   (Concept::HasNumericTraits<PixelType>));
00141   itkConceptMacro(OutputHasPixelTraitsCheck,
00142                   (Concept::HasPixelTraits<OutputPixelType>));
00143 
00145 #endif
00146 
00147 protected:
00148   GradientRecursiveGaussianImageFilter();
00149   virtual ~GradientRecursiveGaussianImageFilter() {};
00150   void PrintSelf(std::ostream& os, Indent indent) const;
00151   
00153   void GenerateData( void );
00154 
00155   // Override since the filter produces the entire dataset
00156   void EnlargeOutputRequestedRegion(DataObject *output);
00157 
00158 private:
00159   GradientRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00160   void operator=(const Self&); //purposely not implemented
00161   
00162   std::vector<GaussianFilterPointer>   m_SmoothingFilters;
00163   DerivativeFilterPointer              m_DerivativeFilter;
00164   OutputImageAdaptorPointer            m_ImageAdaptor;
00165 
00167   bool m_NormalizeAcrossScale; 
00168 
00169 };
00170 
00171 } // end namespace itk
00172 
00173 #ifndef ITK_MANUAL_INSTANTIATION
00174 #include "itkGradientRecursiveGaussianImageFilter.txx"
00175 #endif
00176 
00177 #endif
00178 
00179 
00180 
00181 
00182 

Generated at Sun Sep 23 12:42:49 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000