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

itkHessianRecursiveGaussianImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkHessianRecursiveGaussianImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/05/06 15:20:16 $
00007   Version:   $Revision: 1.5 $
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 __itkHessianRecursiveGaussianImageFilter_h
00018 #define __itkHessianRecursiveGaussianImageFilter_h
00019 
00020 #include "itkRecursiveGaussianImageFilter.h"
00021 #include "itkNthElementImageAdaptor.h"
00022 #include "itkImage.h"
00023 #include "itkSymmetricSecondRankTensor.h"
00024 #include "itkPixelTraits.h"
00025 #include "itkCommand.h"
00026 #include "itkProgressAccumulator.h"
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< SymmetricSecondRankTensor< 
00048   ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00049   ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00050                                         ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00051 class ITK_EXPORT HessianRecursiveGaussianImageFilter:
00052     public ImageToImageFilter<TInputImage,TOutputImage>
00053 {
00054 public:
00056   typedef HessianRecursiveGaussianImageFilter  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                       ::itk::GetImageDimension<TInputImage>::ImageDimension);
00071 
00073   itkStaticConstMacro(NumberOfSmoothingFilters, unsigned int,
00074                       ::itk::GetImageDimension<TInputImage>::ImageDimension-2);
00075 
00080   typedef float                                            InternalRealType;
00081   typedef Image<InternalRealType, 
00082                 ::itk::GetImageDimension<TInputImage>::ImageDimension >   RealImageType;
00083 
00084 
00085 
00086 
00091   typedef NthElementImageAdaptor< TOutputImage,
00092                                   InternalRealType >  OutputImageAdaptorType;
00093   typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00094 
00096   typedef RecursiveGaussianImageFilter<
00097                                 RealImageType,
00098                                 RealImageType
00099                                         >    GaussianFilterType;
00100 
00102   typedef RecursiveGaussianImageFilter<
00103                                 InputImageType,
00104                                 RealImageType
00105                                         >    DerivativeFilterAType;
00106 
00107   typedef RecursiveGaussianImageFilter<
00108                                 RealImageType,
00109                                 RealImageType
00110                                         >    DerivativeFilterBType;
00111 
00113   typedef typename GaussianFilterType::Pointer    GaussianFilterPointer;
00114   typedef std::vector< GaussianFilterPointer >    GaussianFiltersArray;
00115 
00117   typedef typename DerivativeFilterAType::Pointer  DerivativeFilterAPointer;
00118   typedef typename DerivativeFilterBType::Pointer  DerivativeFilterBPointer;
00119 
00121   typedef typename TOutputImage::Pointer          OutputImagePointer;                                  
00122 
00123 
00125   typedef TOutputImage      OutputImageType;
00126   typedef typename          OutputImageType::PixelType      OutputPixelType;
00127   typedef typename PixelTraits<OutputPixelType>::ValueType  OutputComponentType;
00128 
00130   itkNewMacro(Self);
00131 
00133   void SetSigma( RealType sigma );
00134 
00136   void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00137   itkGetMacro( NormalizeAcrossScale, bool );
00138 
00144   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00145 
00146 protected:
00147   
00148   HessianRecursiveGaussianImageFilter();
00149   virtual ~HessianRecursiveGaussianImageFilter() {};
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   
00159 private:
00160 
00161   HessianRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00162   void operator=(const Self&); //purposely not implemented
00163   
00164   GaussianFiltersArray          m_SmoothingFilters;
00165   DerivativeFilterAPointer      m_DerivativeFilterA;
00166   DerivativeFilterBPointer      m_DerivativeFilterB;
00167   OutputImageAdaptorPointer     m_ImageAdaptor;
00168 
00170   bool m_NormalizeAcrossScale; 
00171 
00172   ProgressAccumulator::Pointer  m_Progress;
00173 
00174 };
00175 
00176 } // end namespace itk
00177 
00178 #ifndef ITK_MANUAL_INSTANTIATION
00179 #include "itkHessianRecursiveGaussianImageFilter.txx"
00180 #endif
00181 
00182 #endif
00183 
00184 
00185 
00186 

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