3 #include <itkInterpolateImageFunction.h> 11 template <
class TInputImage,
class TCoordRep =
double>
13 public itk::InterpolateImageFunction<TInputImage,TCoordRep>
18 typedef itk::InterpolateImageFunction<TInputImage,TCoordRep>
Superclass;
27 InterpolateImageFunction)
36 itkStaticConstMacro(
ImageDimension,
unsigned int,Superclass::ImageDimension);
66 virtual
void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE;
72 return SizeType::Filled(1);
79 template <
class T>
bool isZero(
const itk::VariableLengthVector <T> &value)
const 81 for (
unsigned int i = 0;i < value.GetNumberOfElements();++i)
91 template <
class T>
bool isZero(T &data)
const 93 itkExceptionMacro(
"Access to unauthorized method");
114 void operator=(
const Self&);
117 static const unsigned long m_Neighbors;
118 static const unsigned int m_SphereDimension = 3;
120 mutable std::mutex m_LockUsedModels;
121 mutable std::vector <int> m_UsedModels;
123 mutable std::vector < std::vector <MCModelPointer> > m_ReferenceInputModels;
124 mutable std::vector < std::vector <double> > m_ReferenceInputWeights;
125 mutable std::vector <AveragerPointer> m_MCMAveragers;
Superclass::OutputType OutputType
static const unsigned int ImageDimension
itk::InterpolateImageFunction< TInputImage, TCoordRep > Superclass
TInputImage::PixelType PixelType
bool isZero(const itk::VariableLengthVector< T > &value) const
Computes a weighted average of input multi-compartment models. The output model is at the same time g...
itk::SmartPointer< const Self > ConstPointer
Superclass::IndexType IndexType
void TestModelsAdequation(MCModelPointer &inputModel, MCModelPointer &outputModel)
Tests if input and output models of the interpolator are compatible.
void UnlockWorkIndex(unsigned int index) const
Superclass::IndexValueType IndexValueType
Superclass::ContinuousIndexType ContinuousIndexType
virtual void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const ITK_OVERRIDE
Superclass::SizeType SizeType
itk::SmartPointer< Self > Pointer
AveragerType::Pointer AveragerPointer
SizeType GetRadius() const override
virtual void SetSpecificAveragerParameters(unsigned int threadIndex) const
Sets averager specific parameters if sub-classes are derived.
MultiCompartmentModel: holds several diffusion compartments, ordered by type It also handles weights ...
MCModelType::Pointer MCModelPointer
MCMLinearInterpolateImageFunction()
bool isZero(T &data) const
virtual ~MCMLinearInterpolateImageFunction()
void SetReferenceOutputModel(MCModelPointer &model)
Superclass::InputImageType InputImageType
virtual void ResetAveragePointers(MCModelPointer &model)
Resets averager pointers, can be overloaded to handle more models.
MCMLinearInterpolateImageFunction Self
virtual bool CheckModelCompatibility(MCModelPointer &model)
Check if model can actually be interpolated.
Superclass::RealType RealType
unsigned int GetFreeWorkIndex() const
std::vector< AveragerPointer > & GetAveragers() const