itkDiscreteGaussianDerivativeImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkDiscreteGaussianDerivativeImageFilter_h
00019 #define __itkDiscreteGaussianDerivativeImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022 #include "itkFixedArray.h"
00023 #include "itkImage.h"
00024
00025 namespace itk
00026 {
00059 template <class TInputImage, class TOutputImage >
00060 class ITK_EXPORT DiscreteGaussianDerivativeImageFilter :
00061 public ImageToImageFilter< TInputImage, TOutputImage >
00062 {
00063 public:
00065 typedef DiscreteGaussianDerivativeImageFilter Self;
00066 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00067 typedef SmartPointer<Self> Pointer;
00068 typedef SmartPointer<const Self> ConstPointer;
00069
00071 itkNewMacro(Self);
00072
00074 itkTypeMacro(DiscreteGaussianDerivativeImageFilter, ImageToImageFilter);
00075
00077 typedef TInputImage InputImageType;
00078 typedef TOutputImage OutputImageType;
00079
00082 typedef typename TOutputImage::PixelType OutputPixelType;
00083 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00084 typedef typename TInputImage::PixelType InputPixelType;
00085 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00086
00089 itkStaticConstMacro(ImageDimension, unsigned int,
00090 TOutputImage::ImageDimension);
00091
00093 typedef FixedArray<double, itkGetStaticConstMacro(ImageDimension)> ArrayType;
00094
00096 typedef FixedArray<unsigned int, itkGetStaticConstMacro(ImageDimension)> OrderArrayType;
00097
00101 itkSetMacro(Order, OrderArrayType);
00102 itkGetConstMacro(Order, const OrderArrayType);
00104
00111 itkSetMacro(Variance, ArrayType);
00112 itkGetConstMacro(Variance, const ArrayType);
00114
00118 itkSetMacro(MaximumError, ArrayType);
00119 itkGetConstMacro(MaximumError, const ArrayType);
00121
00124 itkGetConstMacro(MaximumKernelWidth, int);
00125 itkSetMacro(MaximumKernelWidth, int);
00127
00130 void SetOrder (const typename OrderArrayType::ValueType v)
00131 {
00132 OrderArrayType a;
00133 a.Fill(v);
00134 this->SetOrder(a);
00135 }
00137
00138 void SetVariance (const typename ArrayType::ValueType v)
00139 {
00140 ArrayType a;
00141 a.Fill(v);
00142 this->SetVariance(a);
00143 }
00144
00145 void SetMaximumError (const typename ArrayType::ValueType v)
00146 {
00147 ArrayType a;
00148 a.Fill(v);
00149 this->SetMaximumError(a);
00150 }
00151
00154 itkSetMacro(UseImageSpacing, bool);
00155 itkGetConstMacro(UseImageSpacing, bool);
00156 itkBooleanMacro(UseImageSpacing);
00158
00159 #ifdef ITK_USE_CONCEPT_CHECKING
00160
00161 itkConceptMacro(OutputHasNumericTraitsCheck,
00162 (Concept::HasNumericTraits<OutputPixelType>));
00163
00165 #endif
00166
00167 protected:
00168
00169 DiscreteGaussianDerivativeImageFilter()
00170 {
00171 m_Order.Fill(1);
00172 m_Variance.Fill(0.0);
00173 m_MaximumError.Fill(0.01);
00174 m_MaximumKernelWidth = 32;
00175 m_UseImageSpacing = true;
00176 }
00177 virtual ~DiscreteGaussianDerivativeImageFilter() {}
00178 void PrintSelf(std::ostream& os, Indent indent) const;
00179
00186 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00187
00193 void GenerateData();
00194
00195 private:
00196
00197 DiscreteGaussianDerivativeImageFilter(const Self&);
00198 void operator=(const Self&);
00199
00201 OrderArrayType m_Order;
00202
00204 ArrayType m_Variance;
00205
00209 ArrayType m_MaximumError;
00210
00213 int m_MaximumKernelWidth;
00214
00216 bool m_UseImageSpacing;
00217 };
00218
00219 }
00220
00221 #ifndef ITK_MANUAL_INSTANTIATION
00222 #include "itkDiscreteGaussianDerivativeImageFilter.txx"
00223 #endif
00224
00225 #endif
00226