3 #include <itkInterpolateImageFunction.h> 4 #include <itkVariableLengthVector.h> 9 template <
class TInputImage,
class TCoordRep =
double>
11 public itk::InterpolateImageFunction<TInputImage,TCoordRep>
16 typedef itk::InterpolateImageFunction<TInputImage,TCoordRep>
Superclass;
25 InterpolateImageFunction);
30 typedef typename Superclass::RealType
RealType;
31 typedef typename Superclass::SizeType
SizeType;
34 itkStaticConstMacro(
ImageDimension,
unsigned int,Superclass::ImageDimension);
44 typedef itk::VariableLengthVector <typename TInputImage::IOPixelType>
VectorPixelType;
58 return SizeType::Filled(1);
65 template <
class T>
inline bool isZero(itk::VariableLengthVector <T> &value)
const 67 for (
unsigned int i = 0;i < value.GetNumberOfElements();++i)
77 template <
class T>
inline bool isZero(T &data)
const 79 itkExceptionMacro(
"Access to unauthorized zero test method");
92 itkExceptionMacro(
"Access to unauthorized zero pixel method");
93 zeroPixel = itk::NumericTraits <T>::ZeroValue();
97 template <
class T1,
class T2>
98 void AddValue(itk::VariableLengthVector <T1> &input,
double weight,
99 itk::VariableLengthVector <T2> &output)
const 101 unsigned int vecDim = input.GetNumberOfElements();
102 for (
unsigned int i = 0;i < vecDim;++i)
103 output[i] += weight * input[i];
107 template <
class T1,
class T2>
void AddValue(T1 &input,
double weight, T2 &output)
const 109 itkExceptionMacro(
"Acces to unauthorized method, check your implementation");
114 void operator=(
const Self&);
117 static const unsigned long m_Neighbors;
VectorModelLinearInterpolateImageFunction Self
Superclass::RealType RealType
virtual ~VectorModelLinearInterpolateImageFunction()
Superclass::IndexType IndexType
TInputImage::PixelType PixelType
static const unsigned int ImageDimension
void InitializeZeroPixel(T &zeroPixel) const
Utility function to initialize output images pixel to zero for all images except vector images...
Superclass::InputImageType InputImageType
itk::InterpolateImageFunction< TInputImage, TCoordRep > Superclass
VectorModelLinearInterpolateImageFunction()
itk::SmartPointer< const Self > ConstPointer
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const ITK_OVERRIDE
SizeType GetRadius() const override
Superclass::OutputType OutputType
bool isZero(itk::VariableLengthVector< T > &value) const
itk::VariableLengthVector< typename TInputImage::IOPixelType > VectorPixelType
itk::SmartPointer< Self > Pointer
Superclass::SizeType SizeType
void InitializeZeroPixel(itk::VariableLengthVector< T > &zeroPixel) const
Utility function to initialize output images pixel to zero for vector images.
Superclass::IndexValueType IndexValueType
void AddValue(T1 &input, double weight, T2 &output) const
Utility function to initialize output images pixel to zero for all images except vector images...
bool isZero(T &data) const
Superclass::ContinuousIndexType ContinuousIndexType
void AddValue(itk::VariableLengthVector< T1 > &input, double weight, itk::VariableLengthVector< T2 > &output) const
Utility function to initialize output images pixel to zero for vector images.