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 __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
00027
00028 namespace itk
00029 {
00030
00042
00043
00044
00045 template <typename TInputImage,
00046 typename TOutputImage= Image< SymmetricSecondRankTensor<
00047 ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00048 ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00049 ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00050 class ITK_EXPORT HessianRecursiveGaussianImageFilter:
00051 public ImageToImageFilter<TInputImage,TOutputImage>
00052 {
00053 public:
00055 typedef HessianRecursiveGaussianImageFilter Self;
00056 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00060
00062 typedef TInputImage InputImageType;
00063 typedef typename TInputImage::PixelType PixelType;
00064 typedef typename NumericTraits<PixelType>::RealType RealType;
00065
00066
00068 itkStaticConstMacro(ImageDimension, unsigned int,
00069 ::itk::GetImageDimension<TInputImage>::ImageDimension);
00070
00072 itkStaticConstMacro(NumberOfSmoothingFilters, unsigned int,
00073 ::itk::GetImageDimension<TInputImage>::ImageDimension-2);
00074
00079 typedef float InternalRealType;
00080 typedef Image<
00081 InternalRealType,
00082 ::itk::GetImageDimension<TInputImage>::ImageDimension > RealImageType;
00083
00088 typedef NthElementImageAdaptor< TOutputImage,
00089 InternalRealType > OutputImageAdaptorType;
00090 typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00091
00093 typedef RecursiveGaussianImageFilter<
00094 RealImageType,
00095 RealImageType
00096 > GaussianFilterType;
00097
00099 typedef RecursiveGaussianImageFilter<
00100 InputImageType,
00101 RealImageType
00102 > DerivativeFilterAType;
00103
00104 typedef RecursiveGaussianImageFilter<
00105 RealImageType,
00106 RealImageType
00107 > DerivativeFilterBType;
00108
00110 typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
00111 typedef std::vector< GaussianFilterPointer > GaussianFiltersArray;
00112
00114 typedef typename DerivativeFilterAType::Pointer DerivativeFilterAPointer;
00115 typedef typename DerivativeFilterBType::Pointer DerivativeFilterBPointer;
00116
00118 typedef typename TOutputImage::Pointer OutputImagePointer;
00119
00121 typedef TOutputImage OutputImageType;
00122 typedef typename OutputImageType::PixelType OutputPixelType;
00123 typedef typename PixelTraits<OutputPixelType>::ValueType OutputComponentType;
00124
00126 itkTypeMacro( HessianRecursiveGaussianImageFilter, ImageToImageFilter );
00127
00129 itkNewMacro(Self);
00130
00132 void SetSigma( RealType sigma );
00133
00135 void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00136 itkGetConstMacro( NormalizeAcrossScale, bool );
00138
00144 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00145
00146 #ifdef ITK_USE_CONCEPT_CHECKING
00147
00148 itkConceptMacro(InputHasNumericTraitsCheck,
00149 (Concept::HasNumericTraits<PixelType>));
00150 itkConceptMacro(OutputHasPixelTraitsCheck,
00151 (Concept::HasPixelTraits<OutputPixelType>));
00152
00154 #endif
00155
00156 protected:
00157
00158 HessianRecursiveGaussianImageFilter();
00159 virtual ~HessianRecursiveGaussianImageFilter() {};
00160 void PrintSelf(std::ostream& os, Indent indent) const;
00161
00163 void GenerateData( void );
00164
00165
00166 void EnlargeOutputRequestedRegion(DataObject *output);
00167
00168
00169 private:
00170
00171 HessianRecursiveGaussianImageFilter(const Self&);
00172 void operator=(const Self&);
00173
00174 GaussianFiltersArray m_SmoothingFilters;
00175 DerivativeFilterAPointer m_DerivativeFilterA;
00176 DerivativeFilterBPointer m_DerivativeFilterB;
00177 OutputImageAdaptorPointer m_ImageAdaptor;
00178
00180 bool m_NormalizeAcrossScale;
00181
00182 };
00183
00184 }
00185
00186 #ifndef ITK_MANUAL_INSTANTIATION
00187 #include "itkHessianRecursiveGaussianImageFilter.txx"
00188 #endif
00189
00190 #endif
00191