itkMultiScaleHessianBasedMeasureImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 typedef typename TOutputImage::RegionType OutputRegionType;
00079
00081 itkStaticConstMacro(ImageDimension, unsigned int, ::itk::GetImageDimension<InputImageType>::ImageDimension);
00082
00084 typedef float ScalesPixelType;
00085 typedef Image<ScalesPixelType, itkGetStaticConstMacro(ImageDimension)> ScalesImageType;
00086
00088 typedef HessianRecursiveGaussianImageFilter< InputImageType, HessianImageType> HessianFilterType;
00089
00093 typedef Image< double, itkGetStaticConstMacro(ImageDimension) > UpdateBufferType;
00094 typedef typename UpdateBufferType::ValueType BufferValueType;
00095
00096 typedef typename Superclass::DataObjectPointer DataObjectPointer;
00097
00099 itkNewMacro(Self);
00100
00102 itkSetMacro(SigmaMinimum, double);
00103 itkGetConstMacro(SigmaMinimum, double);
00105
00107 itkSetMacro(SigmaMaximum, double);
00108 itkGetConstMacro(SigmaMaximum, double);
00110
00112 itkSetMacro(NumberOfSigmaSteps, unsigned int);
00113 itkGetConstMacro(NumberOfSigmaSteps, unsigned int);
00115
00119 itkSetObjectMacro( HessianToMeasureFilter, HessianToMeasureFilterType);
00120 itkGetObjectMacro( HessianToMeasureFilter, HessianToMeasureFilterType);
00122
00129 itkSetMacro(NonNegativeHessianBasedMeasure,bool);
00130 itkGetConstMacro(NonNegativeHessianBasedMeasure,bool);
00131 itkBooleanMacro(NonNegativeHessianBasedMeasure);
00133
00134 typedef enum { EquispacedSigmaSteps = 0,
00135 LogarithmicSigmaSteps = 1 } SigmaStepMethodType;
00136
00139 itkSetMacro(SigmaStepMethod, SigmaStepMethodType);
00140 itkGetConstMacro(SigmaStepMethod, SigmaStepMethodType);
00142
00144 void SetSigmaStepMethodToEquispaced();
00145
00147 void SetSigmaStepMethodToLogarithmic();
00148
00151 const HessianImageType* GetHessianOutput() const;
00152
00155 const ScalesImageType* GetScalesOutput() const;
00156
00157 void EnlargeOutputRequestedRegion (DataObject *);
00158
00161 itkSetMacro(GenerateScalesOutput,bool);
00162 itkGetConstMacro(GenerateScalesOutput,bool);
00163 itkBooleanMacro(GenerateScalesOutput);
00165
00168 itkSetMacro(GenerateHessianOutput,bool);
00169 itkGetConstMacro(GenerateHessianOutput,bool);
00170 itkBooleanMacro(GenerateHessianOutput);
00172
00174 virtual DataObjectPointer MakeOutput(unsigned int idx);
00175
00176 protected:
00177 MultiScaleHessianBasedMeasureImageFilter();
00178 ~MultiScaleHessianBasedMeasureImageFilter() {};
00179 void PrintSelf(std::ostream& os, Indent indent) const;
00180
00182 void GenerateData( void );
00183
00184 private:
00185 void UpdateMaximumResponse(double sigma);
00186 double ComputeSigmaValue(int scaleLevel);
00187
00188 void AllocateUpdateBuffer();
00189
00190
00191 MultiScaleHessianBasedMeasureImageFilter(const Self&);
00192 void operator=(const Self&);
00193
00194 bool m_NonNegativeHessianBasedMeasure;
00195
00196 double m_SigmaMinimum;
00197 double m_SigmaMaximum;
00198
00199 unsigned int m_NumberOfSigmaSteps;
00200 SigmaStepMethodType m_SigmaStepMethod;
00201
00202 typename HessianToMeasureFilterType::Pointer m_HessianToMeasureFilter;
00203 typename HessianFilterType::Pointer m_HessianFilter;
00204 typename UpdateBufferType::Pointer m_UpdateBuffer;
00205
00206 bool m_GenerateScalesOutput;
00207 bool m_GenerateHessianOutput;
00208 };
00209
00210 }
00211
00212 #ifndef ITK_MANUAL_INSTANTIATION
00213 #include "itkMultiScaleHessianBasedMeasureImageFilter.txx"
00214 #endif
00215
00216 #endif
00217