ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkGaussianDerivativeImageFunction.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 __itkGaussianDerivativeImageFunction_h
19 #define __itkGaussianDerivativeImageFunction_h
20 
24 
25 namespace itk
26 {
37 template< class TInputImage, class TOutput = double >
39  public ImageFunction< TInputImage,
40  Vector< TOutput, TInputImage::ImageDimension >,
41  TOutput >
42 {
43 public:
44 
47 
49  typedef ImageFunction< TInputImage,
51  TOutput > Superclass;
52 
56 
58  itkNewMacro(Self);
59 
62 
64  typedef TInputImage InputImageType;
65  typedef typename InputImageType::PixelType InputPixelType;
66  typedef typename InputImageType::IndexType IndexType;
67 
69  itkStaticConstMacro(ImageDimension2, unsigned int,
70  InputImageType::ImageDimension);
71 
74 
77 
79  typedef typename Superclass::OutputType OutputType;
84 
87 
90 
93 
95  virtual OutputType Evaluate(const PointType & point) const;
96 
98  virtual OutputType EvaluateAtIndex(const IndexType & index) const;
99 
101  virtual OutputType EvaluateAtContinuousIndex(
102  const ContinuousIndexType & index) const;
103 
110  void SetSigma(const double *sigma);
111 
112  void SetSigma(const double sigma);
113 
114  const double * GetSigma() const { return m_Sigma; }
115 
117  void SetExtent(const double *extent);
118 
119  void SetExtent(const double extent);
120 
121  const double * GetExtent() const { return m_Extent; }
122 
127  virtual void SetInputImage(const InputImageType *ptr);
128 
129 protected:
131  GaussianDerivativeImageFunction(const Self &);
132 
134 
135  void operator=(const Self &);
136 
137  void PrintSelf(std::ostream & os, Indent indent) const;
138 
139  void RecomputeGaussianKernel();
140 
141  void RecomputeContinuousGaussianKernel(
142  const double *offset) const;
143 
144 private:
145 
146  double m_Sigma[ImageDimension2];
147 
152 
155  double m_Extent[ImageDimension2];
156 
159 
163 };
164 } // namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkGaussianDerivativeImageFunction.hxx"
168 #endif
169 
170 #endif
171