22 #ifndef __itkGaussianInterpolateImageFunction_h
23 #define __itkGaussianInterpolateImageFunction_h
25 #include "itkInterpolateImageFunction.h"
27 #include "itkConceptChecking.h"
28 #include "itkFixedArray.h"
29 #include "vnl/vnl_erf.h"
48 template <
class TInputImage,
class TCoordRep =
double>
50 public InterpolateImageFunction<TInputImage, TCoordRep>
55 typedef InterpolateImageFunction<TInputImage, TCoordRep>
Superclass;
63 itkFactorylessNewMacro(Self)
67 itkStaticConstMacro( ImageDimension,
unsigned int,
68 TInputImage::ImageDimension );
87 typedef FixedArray<RealType,
88 itkGetStaticConstMacro( ImageDimension )>
ArrayType;
93 virtual
void SetInputImage( const TInputImage *image )
95 Superclass::SetInputImage( image );
96 this->ComputeBoundingBox();
104 itkDebugMacro(
"setting Sigma to " << s );
105 if( this->m_Sigma != s )
108 this->ComputeBoundingBox();
112 itkGetConstMacro( Sigma, ArrayType );
116 for(
unsigned int d = 0; d < ImageDimension; d++ )
120 this->SetSigma( sigma );
125 itkDebugMacro(
"setting Alpha to " << a );
126 if( this->m_Alpha != a )
129 this->ComputeBoundingBox();
133 itkGetConstMacro( Alpha, RealType );
137 this->SetSigma( sigma );
138 this->SetAlpha( alpha );
147 return this->EvaluateAtContinuousIndex( cindex,
nullptr );
153 virtual OutputType EvaluateAtContinuousIndex(
154 const ContinuousIndexType &, OutputType * )
const;
159 void PrintSelf( std::ostream& os, Indent indent )
const;
163 void operator=(
const Self& );
165 void ComputeBoundingBox();
167 void ComputeErrorFunctionArray(
unsigned int dimension, RealType cindex,
168 vnl_vector<RealType> &erfArray, vnl_vector<RealType> &gerfArray,
169 bool evaluateGradient =
false )
const;
174 ArrayType m_BoundingBoxStart;
175 ArrayType m_BoundingBoxEnd;
176 ArrayType m_ScalingFactor;
177 ArrayType m_CutoffDistance;
182 #ifndef ITK_MANUAL_INSTANTIATION
~GaussianInterpolateImageFunction()
virtual void SetAlpha(const RealType a)
GaussianInterpolateImageFunction Self
Evaluates the Gaussian interpolation of an image.
SmartPointer< Self > Pointer
void SetSigma(RealType *s)
void SetParameters(RealType *sigma, RealType alpha)
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const
Superclass::OutputType OutputType
Superclass::ContinuousIndexType ContinuousIndexType
SmartPointer< const Self > ConstPointer
Superclass::IndexType IndexType
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
virtual void SetSigma(const ArrayType s)
FixedArray< RealType, itkGetStaticConstMacro(ImageDimension)> ArrayType
Superclass::InputImageType InputImageType
Superclass::RealType RealType