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

itkMultiScaleHessianBasedMeasureImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMultiScaleHessianBasedMeasureImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-02-25 22:25:50 $
00007   Version:   $Revision: 1.4 $
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 __itkMultiScaleHessianBasedMeasureImageFilter_h
00018 #define __itkMultiScaleHessianBasedMeasureImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkHessianRecursiveGaussianImageFilter.h"
00023 
00024 namespace itk
00025 {
00055 template <typename TInputImage,
00056           typename THessianImage, 
00057           typename TOutputImage=TInputImage >
00058 class ITK_EXPORT MultiScaleHessianBasedMeasureImageFilter 
00059 : public
00060 ImageToImageFilter< TInputImage,TOutputImage > 
00061 {
00062 public:
00064   typedef MultiScaleHessianBasedMeasureImageFilter          Self;
00065   typedef ImageToImageFilter<TInputImage,TOutputImage>      Superclass;
00066 
00067   typedef SmartPointer<Self>                                      Pointer;
00068   typedef SmartPointer<const Self>                                ConstPointer;
00069 
00070   typedef TInputImage                                    InputImageType;
00071   typedef TOutputImage                                   OutputImageType;
00072   typedef THessianImage                                  HessianImageType;
00073 
00074   typedef ImageToImageFilter< HessianImageType, OutputImageType  >  HessianToMeasureFilterType;
00075 
00076   typedef typename TInputImage::PixelType                InputPixelType;
00077   typedef typename TOutputImage::PixelType               OutputPixelType;
00078 
00080   itkStaticConstMacro(ImageDimension, unsigned int, ::itk::GetImageDimension<InputImageType>::ImageDimension);
00081 
00083   typedef HessianRecursiveGaussianImageFilter< InputImageType, HessianImageType> HessianFilterType;
00084 
00086   typedef Image< double, itkGetStaticConstMacro(ImageDimension) > UpdateBufferType;
00087   typedef typename UpdateBufferType::ValueType                    BufferValueType;
00088 
00090   itkNewMacro(Self);
00091 
00093   itkSetMacro(SigmaMinimum, double);
00094   itkGetMacro(SigmaMinimum, double);
00096 
00098   itkSetMacro(SigmaMaximum, double);
00099   itkGetMacro(SigmaMaximum, double);
00101 
00103   itkSetMacro(NumberOfSigmaSteps, int);
00104   itkGetMacro(NumberOfSigmaSteps, int);
00106 
00110   itkSetObjectMacro( HessianToMeasureFilter, HessianToMeasureFilterType); 
00111   itkGetObjectMacro( HessianToMeasureFilter, HessianToMeasureFilterType); 
00113 
00114 
00115   typedef enum { EquispacedSigmaSteps = 0,
00116                  LogarithmicSigmaSteps = 1 } SigmaStepMethodType;
00117 
00120   itkSetMacro(SigmaStepMethod, SigmaStepMethodType);
00121   itkGetMacro(SigmaStepMethod, SigmaStepMethodType);
00122   void SetSigmaStepMethodToEquispaced()
00123     { 
00124     this->SetSigmaStepMethod(Self::EquispacedSigmaSteps);
00125     }
00127 
00128   void SetSigmaStepMethodToLogarithmic()
00129     {
00130     this->SetSigmaStepMethod(Self::LogarithmicSigmaSteps);
00131     }
00132 
00137   const HessianImageType* GetHessianOutput() const
00138     {
00139     return static_cast<const HessianImageType*>(this->ProcessObject::GetOutput(2));
00140     }
00141 
00144   const OutputImageType* GetScalesOutput() const
00145     {
00146     return static_cast<const OutputImageType*>(this->ProcessObject::GetOutput(1));
00147     }
00148 
00150   itkSetMacro(GenerateScalesOutput,bool);
00151   itkGetMacro(GenerateScalesOutput,bool);
00152   itkBooleanMacro(GenerateScalesOutput);
00154 
00156   itkSetMacro(GenerateHessianOutput,bool);
00157   itkGetMacro(GenerateHessianOutput,bool);
00158   itkBooleanMacro(GenerateHessianOutput);
00160 
00161 
00162 protected:
00163   MultiScaleHessianBasedMeasureImageFilter();
00164   ~MultiScaleHessianBasedMeasureImageFilter() {};
00165   void PrintSelf(std::ostream& os, Indent indent) const;
00166   
00168   void GenerateData( void );
00169 
00170 private:
00171   void UpdateMaximumResponse(double sigma);
00172 
00173   double ComputeSigmaValue(int scaleLevel);
00174   
00175   void AllocateUpdateBuffer();
00176 
00177   //purposely not implemented
00178   MultiScaleHessianBasedMeasureImageFilter(const Self&); 
00179   void operator=(const Self&); //purposely not implemented
00180 
00181   double                      m_SigmaMinimum;
00182   double                      m_SigmaMaximum;
00183 
00184   int                         m_NumberOfSigmaSteps;
00185   SigmaStepMethodType         m_SigmaStepMethod;
00186 
00187   typename HessianToMeasureFilterType::Pointer  m_HessianToMeasureFilter;
00188   typename HessianFilterType::Pointer           m_HessianFilter;
00189   typename UpdateBufferType::Pointer            m_UpdateBuffer;
00190 
00191   bool m_GenerateScalesOutput;
00192   bool m_GenerateHessianOutput;
00193 };
00194 
00195 } // end namespace itk
00196 
00197 #ifndef ITK_MANUAL_INSTANTIATION
00198 #include "itkMultiScaleHessianBasedMeasureImageFilter.txx"
00199 #endif
00200   
00201 #endif
00202 

Generated at Sat Feb 28 13:04:31 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000