00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGradientRecursiveGaussianImageFilter_h
00018 #define __itkGradientRecursiveGaussianImageFilter_h
00019
00020 #include "itkRecursiveGaussianImageFilter.h"
00021 #include "itkNthElementImageAdaptor.h"
00022 #include "itkImage.h"
00023 #include "itkCovariantVector.h"
00024 #include "itkPixelTraits.h"
00025 #include "itkProgressAccumulator.h"
00026
00027
00028 namespace itk
00029 {
00030
00042
00043
00044
00045 template <typename TInputImage,
00046 typename TOutputImage= Image< CovariantVector<
00047 ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00048 ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00049 ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00050 class ITK_EXPORT GradientRecursiveGaussianImageFilter:
00051 public ImageToImageFilter<TInputImage,TOutputImage>
00052 {
00053 public:
00055 typedef GradientRecursiveGaussianImageFilter 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 TInputImage::ImageDimension);
00070
00075 typedef float InternalRealType;
00076 typedef Image<InternalRealType,
00077 itkGetStaticConstMacro(ImageDimension) > RealImageType;
00078
00079
00080
00081
00086 typedef NthElementImageAdaptor< TOutputImage,
00087 InternalRealType > OutputImageAdaptorType;
00088 typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00089
00091 typedef RecursiveGaussianImageFilter<
00092 RealImageType,
00093 RealImageType
00094 > GaussianFilterType;
00095
00097 typedef RecursiveGaussianImageFilter<
00098 InputImageType,
00099 RealImageType
00100 > DerivativeFilterType;
00101
00102
00104 typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
00105
00107 typedef typename DerivativeFilterType::Pointer DerivativeFilterPointer;
00108
00110 typedef typename TOutputImage::Pointer OutputImagePointer;
00111
00112
00114 typedef TOutputImage OutputImageType;
00115 typedef typename OutputImageType::PixelType OutputPixelType;
00116 typedef typename PixelTraits<OutputPixelType>::ValueType OutputComponentType;
00117
00119 itkNewMacro(Self);
00120
00122 void SetSigma( RealType sigma );
00123
00125 void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00126 itkGetMacro( NormalizeAcrossScale, bool );
00127
00133 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00134
00135 protected:
00136 GradientRecursiveGaussianImageFilter();
00137 virtual ~GradientRecursiveGaussianImageFilter() {};
00138 void PrintSelf(std::ostream& os, Indent indent) const;
00139
00141 void GenerateData( void );
00142
00143
00144 void EnlargeOutputRequestedRegion(DataObject *output);
00145
00146 private:
00147 GradientRecursiveGaussianImageFilter(const Self&);
00148 void operator=(const Self&);
00149
00150 GaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00151 DerivativeFilterPointer m_DerivativeFilter;
00152 OutputImageAdaptorPointer m_ImageAdaptor;
00153
00155 bool m_NormalizeAcrossScale;
00156
00157 };
00158
00159 }
00160
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkGradientRecursiveGaussianImageFilter.txx"
00163 #endif
00164
00165 #endif
00166
00167
00168
00169