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 __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 #include <vector>
00027
00028
00029 namespace itk
00030 {
00031
00043
00044
00045
00046 template <typename TInputImage,
00047 typename TOutputImage= Image< CovariantVector<
00048 ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00049 ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00050 ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00051 class ITK_EXPORT GradientRecursiveGaussianImageFilter:
00052 public ImageToImageFilter<TInputImage,TOutputImage>
00053 {
00054 public:
00056 typedef GradientRecursiveGaussianImageFilter Self;
00057 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00058 typedef SmartPointer<Self> Pointer;
00059 typedef SmartPointer<const Self> ConstPointer;
00060
00061
00063 typedef TInputImage InputImageType;
00064 typedef typename TInputImage::PixelType PixelType;
00065 typedef typename NumericTraits<PixelType>::RealType RealType;
00066
00067
00069 itkStaticConstMacro(ImageDimension, unsigned int,
00070 TInputImage::ImageDimension);
00071
00076 typedef float InternalRealType;
00077 typedef Image<InternalRealType,
00078 itkGetStaticConstMacro(ImageDimension) > RealImageType;
00079
00080
00085 typedef NthElementImageAdaptor< TOutputImage,
00086 InternalRealType > OutputImageAdaptorType;
00087 typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00088
00090 typedef RecursiveGaussianImageFilter<
00091 RealImageType,
00092 RealImageType
00093 > GaussianFilterType;
00094
00096 typedef RecursiveGaussianImageFilter<
00097 InputImageType,
00098 RealImageType
00099 > DerivativeFilterType;
00100
00101
00103 typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
00104
00106 typedef typename DerivativeFilterType::Pointer DerivativeFilterPointer;
00107
00109 typedef typename TOutputImage::Pointer OutputImagePointer;
00110
00111
00113 typedef TOutputImage OutputImageType;
00114 typedef typename OutputImageType::PixelType OutputPixelType;
00115 typedef typename PixelTraits<OutputPixelType>::ValueType OutputComponentType;
00116
00118 itkNewMacro(Self);
00119
00121 itkTypeMacro(GradientRecursiveGaussianImageFilter,
00122 ImageToImageFilter);
00123
00125 void SetSigma( RealType sigma );
00126
00128 void SetNormalizeAcrossScale( bool normalizeInScaleSpace );
00129 itkGetConstMacro( NormalizeAcrossScale, bool );
00131
00137 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00138
00151 itkSetMacro( UseImageDirection, bool );
00152 itkGetConstMacro( UseImageDirection, bool );
00153 itkBooleanMacro( UseImageDirection );
00155
00156 #ifdef ITK_USE_CONCEPT_CHECKING
00157
00158 itkConceptMacro(InputHasNumericTraitsCheck,
00159 (Concept::HasNumericTraits<PixelType>));
00160 itkConceptMacro(OutputHasPixelTraitsCheck,
00161 (Concept::HasPixelTraits<OutputPixelType>));
00162
00164 #endif
00165
00166 protected:
00167 GradientRecursiveGaussianImageFilter();
00168 virtual ~GradientRecursiveGaussianImageFilter() {};
00169 void PrintSelf(std::ostream& os, Indent indent) const;
00170
00172 void GenerateData( void );
00173
00174
00175 void EnlargeOutputRequestedRegion(DataObject *output);
00176
00177 private:
00178 GradientRecursiveGaussianImageFilter(const Self&);
00179 void operator=(const Self&);
00180
00181 std::vector<GaussianFilterPointer> m_SmoothingFilters;
00182 DerivativeFilterPointer m_DerivativeFilter;
00183 OutputImageAdaptorPointer m_ImageAdaptor;
00184
00186 bool m_NormalizeAcrossScale;
00187
00189 bool m_UseImageDirection;
00190 };
00191
00192 }
00193
00194 #ifndef ITK_MANUAL_INSTANTIATION
00195 #include "itkGradientRecursiveGaussianImageFilter.txx"
00196 #endif
00197
00198 #endif
00199