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 __itkSmoothingRecursiveGaussianImageFilter_h
00018 #define __itkSmoothingRecursiveGaussianImageFilter_h
00019
00020 #include "itkRecursiveGaussianImageFilter.h"
00021 #include "itkCastImageFilter.h"
00022 #include "itkImage.h"
00023 #include "itkPixelTraits.h"
00024 #include "itkCommand.h"
00025 #include "itkFixedArray.h"
00026
00027
00028 namespace itk
00029 {
00030
00043 template <typename TInputImage,
00044 typename TOutputImage= TInputImage >
00045 class ITK_EXPORT SmoothingRecursiveGaussianImageFilter:
00046 public ImageToImageFilter<TInputImage,TOutputImage>
00047 {
00048 public:
00050 typedef SmoothingRecursiveGaussianImageFilter Self;
00051 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00055
00057 typedef TInputImage InputImageType;
00058 typedef TOutputImage OutputImageType;
00059 typedef typename TInputImage::PixelType PixelType;
00060 typedef typename NumericTraits<PixelType>::RealType RealType;
00061 typedef typename NumericTraits<PixelType>::ScalarRealType ScalarRealType;
00062
00063
00065 itkTypeMacro(SmoothingRecursiveGaussianImageFilter,
00066 ImageToImageFilter);
00067
00069 itkStaticConstMacro(ImageDimension, unsigned int,
00070 TInputImage::ImageDimension);
00071
00073 typedef FixedArray< ScalarRealType,
00074 itkGetStaticConstMacro(ImageDimension) > SigmaArrayType;
00075
00076
00081 typedef typename NumericTraits< PixelType >::FloatType InternalRealType;
00082 typedef Image<InternalRealType,
00083 itkGetStaticConstMacro(ImageDimension) > RealImageType;
00084
00086 typedef RecursiveGaussianImageFilter<
00087 InputImageType,
00088 RealImageType
00089 > FirstGaussianFilterType;
00090
00092 typedef RecursiveGaussianImageFilter<
00093 RealImageType,
00094 RealImageType
00095 > InternalGaussianFilterType;
00096
00098 typedef CastImageFilter<
00099 RealImageType,
00100 OutputImageType
00101 > CastingFilterType;
00102
00103
00105 typedef typename InternalGaussianFilterType::Pointer InternalGaussianFilterPointer;
00106
00108 typedef typename FirstGaussianFilterType::Pointer FirstGaussianFilterPointer;
00109
00111 typedef typename CastingFilterType::Pointer CastingFilterPointer;
00112
00114 typedef typename OutputImageType::Pointer OutputImagePointer;
00115
00117 itkNewMacro(Self);
00118
00123 void SetSigmaArray( const SigmaArrayType & sigmas );
00124 void SetSigma( ScalarRealType sigma );
00125 SigmaArrayType GetSigmaArray() const;
00126 ScalarRealType GetSigma() const;
00128
00130 void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00131 itkGetConstMacro( NormalizeAcrossScale, bool );
00133
00134 void SetNumberOfThreads( int nb );
00135
00136 #ifdef ITK_USE_CONCEPT_CHECKING
00137
00138 itkConceptMacro(InputHasNumericTraitsCheck,
00139 (Concept::HasNumericTraits<PixelType>));
00140
00142 #endif
00143
00144 protected:
00145 SmoothingRecursiveGaussianImageFilter();
00146 virtual ~SmoothingRecursiveGaussianImageFilter() {};
00147 void PrintSelf(std::ostream& os, Indent indent) const;
00148
00150 void GenerateData( void );
00151
00157 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00158
00159
00160 void EnlargeOutputRequestedRegion(DataObject *output);
00161
00162 private:
00163 SmoothingRecursiveGaussianImageFilter(const Self&);
00164 void operator=(const Self&);
00165
00166 InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00167 FirstGaussianFilterPointer m_FirstSmoothingFilter;
00168 CastingFilterPointer m_CastingFilter;
00169
00171 bool m_NormalizeAcrossScale;
00172
00174 SigmaArrayType m_Sigma;
00175 };
00176
00177 }
00178
00179 #ifndef ITK_MANUAL_INSTANTIATION
00180 #include "itkSmoothingRecursiveGaussianImageFilter.txx"
00181 #endif
00182
00183 #endif
00184