00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGradientMagnitudeRecursiveGaussianImageFilter_h
00018 #define __itkGradientMagnitudeRecursiveGaussianImageFilter_h
00019
00020 #include "itkNthElementImageAdaptor.h"
00021 #include "itkImage.h"
00022 #include "itkPixelTraits.h"
00023 #include "itkRecursiveGaussianImageFilter.h"
00024 #include "itkInPlaceImageFilter.h"
00025
00026 namespace itk
00027 {
00028
00040
00041
00042
00043 template <typename TInputImage,
00044 typename TOutputImage= TInputImage >
00045 class ITK_EXPORT GradientMagnitudeRecursiveGaussianImageFilter:
00046 public InPlaceImageFilter<TInputImage,TOutputImage>
00047 {
00048 public:
00050 typedef GradientMagnitudeRecursiveGaussianImageFilter Self;
00051 typedef InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00055
00057 typedef TInputImage InputImageType;
00058 typedef typename InputImageType::PixelType PixelType;
00059
00060
00062 itkStaticConstMacro(ImageDimension, unsigned int,
00063 TInputImage::ImageDimension);
00064
00065 typedef typename NumericTraits<PixelType>::RealType RealType;
00066
00071 typedef float InternalRealType;
00072 typedef Image<InternalRealType,
00073 itkGetStaticConstMacro(ImageDimension) > RealImageType;
00074
00076 typedef RecursiveGaussianImageFilter<
00077 RealImageType,
00078 RealImageType
00079 > GaussianFilterType;
00080
00082 typedef RecursiveGaussianImageFilter<
00083 InputImageType,
00084 RealImageType
00085 > DerivativeFilterType;
00086
00088 typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
00089
00091 typedef typename DerivativeFilterType::Pointer DerivativeFilterPointer;
00092
00094 typedef typename TOutputImage::Pointer OutputImagePointer;
00095
00097 typedef TOutputImage OutputImageType;
00098 typedef typename OutputImageType::PixelType OutputPixelType;
00099
00101 typedef Image< InternalRealType,
00102 itkGetStaticConstMacro(ImageDimension) > CumulativeImageType;
00103 typedef typename CumulativeImageType::Pointer CumulativeImagePointer;
00104
00106 itkNewMacro(Self);
00107
00109 void SetSigma( RealType sigma );
00110
00112 void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00113 itkGetMacro( NormalizeAcrossScale, bool );
00115
00116 #ifdef ITK_USE_CONCEPT_CHECKING
00117
00118 itkConceptMacro(InputHasNumericTraitsCheck,
00119 (Concept::HasNumericTraits<PixelType>));
00120
00122 #endif
00123
00124 protected:
00125 GradientMagnitudeRecursiveGaussianImageFilter();
00126 virtual ~GradientMagnitudeRecursiveGaussianImageFilter() {};
00127 void PrintSelf(std::ostream& os, Indent indent) const;
00128
00130 void GenerateData( void );
00131
00138 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00139
00143 void EnlargeOutputRequestedRegion(DataObject *output);
00144
00145 private:
00146 GradientMagnitudeRecursiveGaussianImageFilter(const Self&);
00147 void operator=(const Self&);
00148
00149 GaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00150 DerivativeFilterPointer m_DerivativeFilter;
00151
00153 bool m_NormalizeAcrossScale;
00154
00155
00156 };
00157
00158 }
00159
00160 #ifndef ITK_MANUAL_INSTANTIATION
00161 #include "itkGradientMagnitudeRecursiveGaussianImageFilter.txx"
00162 #endif
00163
00164 #endif
00165
00166
00167
00168
00169