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: 2006/03/28 19:59:05 $
00007   Version:   $Revision: 1.6 $
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 );
00139 
00145   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00146 
00147 #ifdef ITK_USE_CONCEPT_CHECKING
00148 
00149   itkConceptMacro(InputHasNumericTraitsCheck,
00150                   (Concept::HasNumericTraits<PixelType>));
00151   itkConceptMacro(OutputHasPixelTraitsCheck,
00152                   (Concept::HasPixelTraits<OutputPixelType>));
00153 
00155 #endif
00156 
00157 protected:
00158   
00159   HessianRecursiveGaussianImageFilter();
00160   virtual ~HessianRecursiveGaussianImageFilter() {};
00161   void PrintSelf(std::ostream& os, Indent indent) const;
00162   
00164   void GenerateData( void );
00165 
00166   // Override since the filter produces the entire dataset
00167   void EnlargeOutputRequestedRegion(DataObject *output);
00168 
00169   
00170 private:
00171 
00172   HessianRecursiveGaussianImageFilter(const Self&); //purposely not implemented
00173   void operator=(const Self&); //purposely not implemented
00174   
00175   GaussianFiltersArray          m_SmoothingFilters;
00176   DerivativeFilterAPointer      m_DerivativeFilterA;
00177   DerivativeFilterBPointer      m_DerivativeFilterB;
00178   OutputImageAdaptorPointer     m_ImageAdaptor;
00179 
00181   bool m_NormalizeAcrossScale; 
00182 
00183   ProgressAccumulator::Pointer  m_Progress;
00184 
00185 };
00186 
00187 } // end namespace itk
00188 
00189 #ifndef ITK_MANUAL_INSTANTIATION
00190 #include "itkHessianRecursiveGaussianImageFilter.txx"
00191 #endif
00192 
00193 #endif
00194 
00195 
00196 
00197 
00198 

Generated at Fri Sep 8 03:14:22 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000