ITK  4.9.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 ITK_OVERRIDE;
111 
113  virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE;
114 
117  const ContinuousIndexType & index) const ITK_OVERRIDE;
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) ITK_OVERRIDE;
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 ITK_OVERRIDE;
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
FixedArray< GaussianDerivativeOperatorType, itkGetStaticConstMacro(ImageDimension2) > GaussianDerivativeOperatorArrayType
virtual OutputType Evaluate(const PointType &point) const override
Compute the convolution of a neighborhood operator with the image at a specific location in space...
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetVariance(VarianceArrayType _arg)
void Fill(const ValueType &)
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...
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
NeighborhoodOperatorImageFunction< InputImageType, TOutput > OperatorImageFunctionType
Neighborhood< TOutput, itkGetStaticConstMacro(ImageDimension2) > KernelType
virtual void Modified() const
ContinuousIndex< TOutput, itkGetStaticConstMacro(ImageDimension) > ContinuousIndexType
virtual void SetInputImage(const InputImageType *ptr) override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageFunction< TInputImage, TOutput, TOutput > Superclass
virtual OutputType EvaluateAtIndex(const IndexType &index) const override
Evaluates a function of an image at specified position.
itk::GaussianDerivativeOperator< TOutput, itkGetStaticConstMacro(ImageDimension2) > GaussianDerivativeOperatorType