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
00026
00027 namespace itk
00028 {
00029
00042 template <typename TInputImage,
00043 typename TOutputImage= TInputImage >
00044 class ITK_EXPORT SmoothingRecursiveGaussianImageFilter:
00045 public ImageToImageFilter<TInputImage,TOutputImage>
00046 {
00047 public:
00049 typedef SmoothingRecursiveGaussianImageFilter Self;
00050 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00054
00056 typedef TInputImage InputImageType;
00057 typedef TOutputImage OutputImageType;
00058 typedef typename TInputImage::PixelType PixelType;
00059 typedef typename NumericTraits<PixelType>::RealType RealType;
00060 typedef typename NumericTraits<PixelType>::ScalarRealType ScalarRealType;
00061
00062
00064 itkStaticConstMacro(ImageDimension, unsigned int,
00065 TInputImage::ImageDimension);
00066
00071 typedef typename NumericTraits< PixelType >::FloatType InternalRealType;
00072 typedef Image<InternalRealType,
00073 itkGetStaticConstMacro(ImageDimension) > RealImageType;
00074
00076 typedef RecursiveGaussianImageFilter<
00077 InputImageType,
00078 RealImageType
00079 > FirstGaussianFilterType;
00080
00082 typedef RecursiveGaussianImageFilter<
00083 RealImageType,
00084 RealImageType
00085 > InternalGaussianFilterType;
00086
00088 typedef CastImageFilter<
00089 RealImageType,
00090 OutputImageType
00091 > CastingFilterType;
00092
00093
00095 typedef typename InternalGaussianFilterType::Pointer InternalGaussianFilterPointer;
00096
00098 typedef typename FirstGaussianFilterType::Pointer FirstGaussianFilterPointer;
00099
00101 typedef typename CastingFilterType::Pointer CastingFilterPointer;
00102
00104 typedef typename OutputImageType::Pointer OutputImagePointer;
00105
00107 itkNewMacro(Self);
00108
00110 void SetSigma( ScalarRealType sigma );
00111
00113 void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00114 itkGetMacro( NormalizeAcrossScale, bool );
00116
00117 #ifdef ITK_USE_CONCEPT_CHECKING
00118
00119 itkConceptMacro(InputHasNumericTraitsCheck,
00120 (Concept::HasNumericTraits<PixelType>));
00121
00123 #endif
00124
00125 protected:
00126 SmoothingRecursiveGaussianImageFilter();
00127 virtual ~SmoothingRecursiveGaussianImageFilter() {};
00128 void PrintSelf(std::ostream& os, Indent indent) const;
00129
00131 void GenerateData( void );
00132
00138 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00139
00140
00141 void EnlargeOutputRequestedRegion(DataObject *output);
00142
00143 private:
00144 SmoothingRecursiveGaussianImageFilter(const Self&);
00145 void operator=(const Self&);
00146
00147 InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00148 FirstGaussianFilterPointer m_FirstSmoothingFilter;
00149 CastingFilterPointer m_CastingFilter;
00150
00152 bool m_NormalizeAcrossScale;
00153
00154 };
00155
00156 }
00157
00158 #ifndef ITK_MANUAL_INSTANTIATION
00159 #include "itkSmoothingRecursiveGaussianImageFilter.txx"
00160 #endif
00161
00162 #endif
00163
00164
00165
00166
00167