ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkDiscreteGaussianDerivativeImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkDiscreteGaussianDerivativeImageFunction_h
19 #define __itkDiscreteGaussianDerivativeImageFunction_h
20 
23 
24 namespace itk
25 {
46 template< typename TInputImage, typename TOutput = double >
48  public ImageFunction< TInputImage, TOutput, TOutput >
49 {
50 public:
51 
54 
57 
61 
63  itkNewMacro(Self);
64 
67 
71  typedef typename Superclass::IndexType IndexType;
74  typedef typename Superclass::PointType PointType;
75 
77  itkStaticConstMacro(ImageDimension2, unsigned int,
78  InputImageType::ImageDimension);
79 
82 
87 
88  typedef itk::GaussianDerivativeOperator< TOutput,
90 
94 
97 
103 
106 
107 public:
108 
110  virtual OutputType Evaluate(const PointType & point) const;
111 
113  virtual OutputType EvaluateAtIndex(const IndexType & index) const;
114 
117  const ContinuousIndexType & index) const;
118 
125  itkSetMacro(Variance, VarianceArrayType);
126  itkGetConstMacro(Variance, const VarianceArrayType);
127  itkSetVectorMacro(Variance, double, VarianceArrayType::Length);
129 
131  virtual void SetVariance(double variance)
132  {
133  m_Variance.Fill(variance);
134  this->Modified();
135  }
137 
141  void SetSigma(const double sigma)
142  {
143  SetVariance(sigma * sigma);
144  }
145 
152  itkSetClampMacro(MaximumError, double, 0.00001, 0.99999);
153  itkGetConstMacro(MaximumError, double);
155 
157  itkSetMacro(Order, OrderArrayType);
158  itkGetConstMacro(Order, const OrderArrayType);
159  itkSetVectorMacro(Order, unsigned int, OrderArrayType::Length);
161 
163  virtual void SetOrder(unsigned int order)
164  {
165  m_Order.Fill(order);
166  this->Modified();
167  }
169 
173  itkSetMacro(NormalizeAcrossScale, bool);
174  itkGetConstMacro(NormalizeAcrossScale, bool);
175  itkBooleanMacro(NormalizeAcrossScale);
177 
179  itkSetMacro(UseImageSpacing, bool);
180  itkGetConstMacro(UseImageSpacing, bool);
181  itkBooleanMacro(UseImageSpacing);
183 
188  itkSetMacro(MaximumKernelWidth, unsigned int);
189  itkGetConstMacro(MaximumKernelWidth, unsigned int);
191 
193  itkSetMacro(InterpolationMode, InterpolationModeType);
194  itkGetConstMacro(InterpolationMode, InterpolationModeType);
196 
201  virtual void SetInputImage(const InputImageType *ptr);
202 
206  virtual void Initialize() { RecomputeGaussianKernel(); }
207 
208 protected:
209 
212 
214 
215  void operator=(const Self &){}
216  void PrintSelf(std::ostream & os, Indent indent) const;
217 
219 
220 private:
221 
224 
227 
231 
235  unsigned int m_MaximumKernelWidth;
236 
239 
243 
246 
249 
252 
255 };
256 } // namespace itk
257 
258 #ifndef ITK_MANUAL_INSTANTIATION
259 #include "itkDiscreteGaussianDerivativeImageFunction.hxx"
260 #endif
261 
262 #endif
Light weight base class for most itk classes.
Point< TOutput, itkGetStaticConstMacro(ImageDimension) > PointType
virtual void SetInputImage(const InputImageType *ptr)
FixedArray< GaussianDerivativeOperatorType, itkGetStaticConstMacro(ImageDimension2) > GaussianDerivativeOperatorArrayType
Compute the convolution of a neighborhood operator with the image at a specific location in space...
virtual void SetVariance(VarianceArrayType _arg)
void Fill(const ValueType &)
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const
virtual OutputType EvaluateAtIndex(const IndexType &index) const
Compute the discrete gaussian derivatives of an the image at a specific location in space...
FixedArray< double, itkGetStaticConstMacro(ImageDimension2) > VarianceArrayType
FixedArray< unsigned int, itkGetStaticConstMacro(ImageDimension2) > OrderArrayType
A NeighborhoodOperator whose coefficients are a one dimensional, discrete derivative Gaussian kernel...
NeighborhoodOperatorImageFunction< InputImageType, TOutput > OperatorImageFunctionType
Neighborhood< TOutput, itkGetStaticConstMacro(ImageDimension2) > KernelType
virtual void Modified() const
ContinuousIndex< TOutput, itkGetStaticConstMacro(ImageDimension) > ContinuousIndexType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageFunction< TInputImage, TOutput, TOutput > Superclass
Evaluates a function of an image at specified position.
void PrintSelf(std::ostream &os, Indent indent) const
itk::GaussianDerivativeOperator< TOutput, itkGetStaticConstMacro(ImageDimension2) > GaussianDerivativeOperatorType
virtual OutputType Evaluate(const PointType &point) const