ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkGaussianBlurImageFunction.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 __itkGaussianBlurImageFunction_h
19 #define __itkGaussianBlurImageFunction_h
20 
22 #include "itkGaussianOperator.h"
24 
25 namespace itk
26 {
42 template< typename TInputImage, typename TOutput = double >
44  public ImageFunction< TInputImage, TOutput >
45 {
46 public:
47 
50 
53 
57 
59  itkNewMacro(Self);
60 
63 
65  typedef TInputImage InputImageType;
66  typedef typename InputImageType::PixelType InputPixelType;
67  typedef typename Superclass::IndexType IndexType;
69 
71  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
72 
73  typedef GaussianOperator<
74  TOutput, itkGetStaticConstMacro(ImageDimension) > GaussianOperatorType;
77 
81  typedef itk::Image<
84 
87 
90 
94 
96  typedef typename Superclass::PointType PointType;
97 
99  virtual TOutput Evaluate(const PointType & point) const;
100 
102  virtual TOutput EvaluateAtIndex(const IndexType & index) const;
103 
105  virtual TOutput EvaluateAtContinuousIndex(
106  const ContinuousIndexType & index) const;
107 
114  void SetSigma(const double *sigma);
115 
116  void SetSigma(const float *sigma);
117 
118  void SetSigma(const double sigma);
119 
120  itkSetMacro(Sigma, SigmaArrayType);
121  itkGetConstReferenceMacro(Sigma, SigmaArrayType);
122 
127  virtual void SetInputImage(const InputImageType *ptr);
128 
132  itkSetMacro(Extent, ExtentArrayType);
133  itkGetConstReferenceMacro(Extent, ExtentArrayType);
134  void SetExtent(const double *extent);
136 
137  void SetExtent(const double extent);
138 
142  itkSetMacro(MaximumError, ErrorArrayType);
143  itkGetConstReferenceMacro(MaximumError, ErrorArrayType);
145 
150  itkSetMacro(MaximumKernelWidth, int);
151  itkGetConstMacro(MaximumKernelWidth, int);
153 
159  itkSetMacro(UseImageSpacing, bool);
160  itkGetConstMacro(UseImageSpacing, bool);
161  itkBooleanMacro(UseImageSpacing);
163 
164 protected:
167 
169 
170  void operator=(const Self &);
171 
172  void PrintSelf(std::ostream & os, Indent indent) const;
173 
175 
176  void RecomputeContinuousGaussianKernel(const double *offset) const;
177 
178 private:
179 
180  virtual TOutput EvaluateAtIndex(
181  const IndexType & index, const OperatorArrayType & operatorArray) const;
182 
189 
195 
199 
202 
205 
208 };
209 } // end namespace itk
210 
211 #ifndef ITK_MANUAL_INSTANTIATION
212 #include "itkGaussianBlurImageFunction.hxx"
213 #endif
214 
215 #endif
A NeighborhoodOperator whose coefficients are a one dimensional, discrete Gaussian kernel...
Light weight base class for most itk classes.
Point< float, itkGetStaticConstMacro(ImageDimension) > PointType
Superclass::ContinuousIndexType ContinuousIndexType
NeighborhoodOperatorImageFunction< InputImageType, TOutput > OperatorImageFunctionType
void SetSigma(const double *sigma)
OperatorInternalImageFunctionPointer m_OperatorInternalImageFunction
NeighborhoodOperatorImageFunction< InternalImageType, TOutput > OperatorInternalImageFunctionType
virtual TOutput EvaluateAtIndex(const IndexType &index) const
FixedArray< NeighborhoodType, itkGetStaticConstMacro(ImageDimension) > OperatorArrayType
virtual TOutput EvaluateAtContinuousIndex(const ContinuousIndexType &index) const
InternalImageType::Pointer InternalImagePointer
Compute the convolution of a neighborhood operator with the image at a specific location in space...
NumericTraits< InputPixelType >::RealType InputPixelRealType
itk::FixedArray< double, itkGetStaticConstMacro(ImageDimension) > ExtentArrayType
void PrintSelf(std::ostream &os, Indent indent) const
GaussianOperator< TOutput, itkGetStaticConstMacro(ImageDimension) > GaussianOperatorType
Neighborhood< TOutput, itkGetStaticConstMacro(ImageDimension) > NeighborhoodType
Compute the convolution of a neighborhood operator with the image at a specific location in space...
virtual void SetExtent(ExtentArrayType _arg)
virtual void SetInputImage(const InputImageType *ptr)
ImageFunction< TInputImage, TOutput > Superclass
N-dimensional gaussian spatial function class.
void RecomputeContinuousGaussianKernel(const double *offset) const
OperatorInternalImageFunctionType::Pointer OperatorInternalImageFunctionPointer
itk::FixedArray< double, itkGetStaticConstMacro(ImageDimension) > ErrorArrayType
OperatorImageFunctionType::Pointer OperatorImageFunctionPointer
ContinuousIndex< float, itkGetStaticConstMacro(ImageDimension) > ContinuousIndexType
itk::FixedArray< double, itkGetStaticConstMacro(ImageDimension) > SigmaArrayType
OperatorImageFunctionPointer m_OperatorImageFunction
virtual TOutput Evaluate(const PointType &point) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
GaussianSpatialFunction< TOutput, 1 > GaussianFunctionType
Define additional traits for native types such as int or float.
GaussianFunctionType::Pointer GaussianFunctionPointer
itk::Image< InputPixelRealType, itkGetStaticConstMacro(ImageDimension) > InternalImageType
Evaluates a function of an image at specified position.
Templated n-dimensional image class.
Definition: itkImage.h:75
void operator=(const Self &)