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

itkGradientMagnitudeRecursiveGaussianImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGradientMagnitudeRecursiveGaussianImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/09/27 11:36:40 $
00007   Version:   $Revision: 1.16 $
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 __itkGradientMagnitudeRecursiveGaussianImageFilter_h
00018 #define __itkGradientMagnitudeRecursiveGaussianImageFilter_h
00019 
00020 #include "itkNthElementImageAdaptor.h"
00021 #include "itkImage.h"
00022 #include "itkPixelTraits.h"
00023 #include "itkRecursiveGaussianImageFilter.h"
00024 #include "itkInPlaceImageFilter.h"
00025 
00026 namespace itk
00027 {
00028 
00040 // NOTE that the ITK_TYPENAME macro has to be used here in lieu 
00041 // of "typename" because VC++ doesn't like the typename keyword 
00042 // on the defaults of template parameters
00043 template <typename TInputImage, 
00044           typename TOutputImage= TInputImage >
00045 class ITK_EXPORT GradientMagnitudeRecursiveGaussianImageFilter:
00046     public InPlaceImageFilter<TInputImage,TOutputImage>
00047 {
00048 public:
00050   typedef GradientMagnitudeRecursiveGaussianImageFilter  Self;
00051   typedef InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
00052   typedef SmartPointer<Self>                   Pointer;
00053   typedef SmartPointer<const Self>        ConstPointer;
00054 
00055   
00057   typedef TInputImage                                    InputImageType;
00058   typedef typename InputImageType::PixelType             PixelType;
00059 
00060 
00062   itkStaticConstMacro(ImageDimension, unsigned int,
00063                       TInputImage::ImageDimension);
00064 
00065   typedef typename NumericTraits<PixelType>::RealType      RealType;
00066 
00071   typedef float                                            InternalRealType;
00072   typedef Image<InternalRealType, 
00073                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00074 
00076   typedef RecursiveGaussianImageFilter<
00077     RealImageType,
00078     RealImageType
00079     >    GaussianFilterType;
00080 
00082   typedef RecursiveGaussianImageFilter<
00083     InputImageType,
00084     RealImageType
00085     >    DerivativeFilterType;
00086 
00088   typedef typename GaussianFilterType::Pointer     GaussianFilterPointer;
00089 
00091   typedef typename DerivativeFilterType::Pointer   DerivativeFilterPointer;
00092 
00094   typedef typename TOutputImage::Pointer           OutputImagePointer;
00095 
00097   typedef TOutputImage      OutputImageType;
00098   typedef typename          OutputImageType::PixelType      OutputPixelType;
00099 
00101   typedef Image< InternalRealType, 
00102                  itkGetStaticConstMacro(ImageDimension) >      CumulativeImageType;
00103   typedef typename CumulativeImageType::Pointer                CumulativeImagePointer;
00104 
00106   itkNewMacro(Self);
00107 
00109   itkTypeMacro(GradientMagnitudeRecursiveGaussianImageFilter, 
00110                InPlaceImageFilter);
00111 
00113   void SetSigma( RealType sigma );
00114 
00116   void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00117   itkGetMacro( NormalizeAcrossScale, bool );
00119 
00120 #ifdef ITK_USE_CONCEPT_CHECKING
00121 
00122   itkConceptMacro(InputHasNumericTraitsCheck,
00123                   (Concept::HasNumericTraits<PixelType>));
00124 
00126 #endif
00127 
00128 protected:
00129   GradientMagnitudeRecursiveGaussianImageFilter();
00130   virtual ~GradientMagnitudeRecursiveGaussianImageFilter() {};
00131   void PrintSelf(std::ostream& os, Indent indent) const;
00132   
00134   void GenerateData( void );
00135 
00142   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00143 
00147   void EnlargeOutputRequestedRegion(DataObject *output);
00148 
00149 private:
00150   GradientMagnitudeRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00151   void operator=(const Self&); //purposely not implemented
00152   
00153   GaussianFilterPointer         m_SmoothingFilters[ImageDimension-1];
00154   DerivativeFilterPointer       m_DerivativeFilter;
00155 
00157   bool m_NormalizeAcrossScale; 
00158 
00159 
00160 };
00161 
00162 } // end namespace itk
00163 
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkGradientMagnitudeRecursiveGaussianImageFilter.txx"
00166 #endif
00167 
00168 #endif
00169 
00170 
00171 
00172 
00173 

Generated at Tue Jul 29 20:13:20 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000