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: 2006/03/28 19:59:02 $
00007   Version:   $Revision: 1.35 $
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 );
00128 
00134   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00135 
00136 #ifdef ITK_USE_CONCEPT_CHECKING
00137 
00138   itkConceptMacro(InputHasNumericTraitsCheck,
00139                   (Concept::HasNumericTraits<PixelType>));
00140   itkConceptMacro(OutputHasPixelTraitsCheck,
00141                   (Concept::HasPixelTraits<OutputPixelType>));
00142 
00144 #endif
00145 
00146 protected:
00147   GradientRecursiveGaussianImageFilter();
00148   virtual ~GradientRecursiveGaussianImageFilter() {};
00149   void PrintSelf(std::ostream& os, Indent indent) const;
00150   
00152   void GenerateData( void );
00153 
00154   // Override since the filter produces the entire dataset
00155   void EnlargeOutputRequestedRegion(DataObject *output);
00156 
00157 private:
00158   GradientRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00159   void operator=(const Self&); //purposely not implemented
00160   
00161   GaussianFilterPointer         m_SmoothingFilters[ImageDimension-1];
00162   DerivativeFilterPointer       m_DerivativeFilter;
00163   OutputImageAdaptorPointer     m_ImageAdaptor;
00164 
00166   bool m_NormalizeAcrossScale; 
00167 
00168 };
00169 
00170 } // end namespace itk
00171 
00172 #ifndef ITK_MANUAL_INSTANTIATION
00173 #include "itkGradientRecursiveGaussianImageFilter.txx"
00174 #endif
00175 
00176 #endif
00177 
00178 
00179 
00180 
00181 

Generated at Mon Mar 12 00:31:15 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000