Orfeo Toolbox  3.16
itkDiscreteGaussianDerivativeImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkDiscreteGaussianDerivativeImageFunction.h,v $
5  Language: C++
6  Date: $Date: 2009-10-29 11:19:14 $
7  Version: $Revision: 1.11 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __itkDiscreteGaussianDerivativeImageFunction_h
19 #define __itkDiscreteGaussianDerivativeImageFunction_h
20 
22 #include "itkImageFunction.h"
23 #include "itkGaussianOperator.h"
25 
26 namespace itk
27 {
28 
48 template <class TInputImage,class TOutput=double>
50  public ImageFunction< TInputImage, TOutput, TOutput >
51 {
52 public:
53 
56 
59 
63 
65  itkNewMacro(Self);
66 
69 
72  typedef typename Superclass::InputPixelType InputPixelType;
73  typedef typename Superclass::IndexType IndexType;
74  typedef typename Superclass::IndexValueType IndexValueType;
75  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
76  typedef typename Superclass::PointType PointType;
77 
79  itkStaticConstMacro(ImageDimension2, unsigned int,
80  InputImageType::ImageDimension);
81 
84 
88 
89  typedef itk::GaussianDerivativeOperator<TOutput,
90  itkGetStaticConstMacro(ImageDimension2)> GaussianDerivativeOperatorType;
91 
94  itkGetStaticConstMacro(ImageDimension2)> GaussianDerivativeOperatorArrayType;
95 
98 
103 
106 
107 public:
108 
110  virtual OutputType Evaluate(const PointType& point) const;
111 
113  virtual OutputType EvaluateAtIndex( const IndexType & index ) const;
114 
116  virtual OutputType EvaluateAtContinuousIndex(
117  const ContinuousIndexType & index ) const;
118 
125  itkSetMacro( Variance, VarianceArrayType );
126  itkGetConstMacro( Variance, const VarianceArrayType );
127  itkSetVectorMacro( Variance, double, VarianceArrayType::Length );
128 
130  virtual void SetVariance( double variance )
131  {
132  m_Variance.Fill( variance );
133  this->Modified();
134  }
135 
139  void SetSigma( const double sigma )
140  {
141  SetVariance( sigma * sigma );
142  }
143 
150  itkSetClampMacro( MaximumError, double, 0.00001, 0.99999 );
151  itkGetConstMacro( MaximumError, double );
152 
154  itkSetMacro( Order, OrderArrayType );
155  itkGetConstMacro( Order, const OrderArrayType );
156  itkSetVectorMacro( Order, unsigned int, OrderArrayType::Length );
157 
159  virtual void SetOrder( unsigned int order )
160  {
161  m_Order.Fill( order );
162  this->Modified();
163  }
164 
168  itkSetMacro( NormalizeAcrossScale, bool );
169  itkGetConstMacro( NormalizeAcrossScale, bool );
170  itkBooleanMacro( NormalizeAcrossScale );
171 
173  itkSetMacro( UseImageSpacing, bool );
174  itkGetConstMacro( UseImageSpacing, bool );
175  itkBooleanMacro( UseImageSpacing );
176 
181  itkSetMacro( MaximumKernelWidth, unsigned int );
182  itkGetConstMacro( MaximumKernelWidth, unsigned int );
183 
185  itkSetMacro( InterpolationMode, InterpolationModeType );
186  itkGetConstMacro( InterpolationMode, InterpolationModeType );
187 
192  virtual void SetInputImage( const InputImageType * ptr );
193 
197  virtual void Initialize( ) { RecomputeGaussianKernel(); }
198 
199 protected:
200 
203 
205 
206  void operator=( const Self& ){};
207  void PrintSelf(std::ostream& os, Indent indent) const;
208 
209  void RecomputeGaussianKernel();
210 
211 private:
212 
215 
218 
222 
226  unsigned int m_MaximumKernelWidth;
227 
230 
234 
237 
240 
243 
246 
247 };
248 
249 } // namespace itk
250 
251 // Define instantiation macro for this template.
252 #define ITK_TEMPLATE_DiscreteGaussianDerivativeImageFunction(_, EXPORT, x, y) namespace itk { \
253  _(2(class EXPORT DiscreteGaussianDerivativeImageFunction< ITK_TEMPLATE_2 x >)) \
254  namespace Templates { typedef DiscreteGaussianDerivativeImageFunction< ITK_TEMPLATE_2 x > \
255  DiscreteGaussianDerivativeImageFunction##y; } \
256  }
257 
258 #if ITK_TEMPLATE_EXPLICIT
259 # include "Templates/itkDiscreteGaussianDerivativeImageFunction+-.h"
260 #endif
261 
262 #if ITK_TEMPLATE_TXX
264 #endif
265 
266 #endif

Generated at Sat Feb 2 2013 23:35:29 for Orfeo Toolbox with doxygen 1.8.1.1