v2.0.0
Loading...
Searching...
No Matches
DISP3DLIB::Interpolation Class Reference

This class holds methods for creating distance-based weight matrices and for interpolating signals. More...

#include <interpolation.h>

Public Types

typedef QSharedPointer< Interpolation > SPtr
typedef QSharedPointer< const Interpolation > ConstSPtr

Public Member Functions

 Interpolation ()=delete

Static Public Member Functions

static QSharedPointer< Eigen::SparseMatrix< float > > createInterpolationMat (const Eigen::VectorXi &vecProjectedSensors, const QSharedPointer< Eigen::MatrixXd > matDistanceTable, double(*interpolationFunction)(double), const double dCancelDist=FLOAT_INFINITY, const Eigen::VectorXi &vecExcludeIndex=Eigen::VectorXi())
 createInterpolationMat Calculates the weight matrix for interpolation.
static Eigen::VectorXf interpolateSignal (const QSharedPointer< Eigen::SparseMatrix< float > > matInterpolationMatrix, const QSharedPointer< Eigen::VectorXf > &vecMeasurementData)
 interpolateSignal Interpolates sensor data using the weight matrix (shared pointer version).
static Eigen::VectorXf interpolateSignal (const Eigen::SparseMatrix< float > &matInterpolationMatrix, const Eigen::VectorXf &vecMeasurementData)
 interpolateSignal Interpolates sensor data using the weight matrix (reference version).
static double linear (const double dIn)
 linear Identity interpolation function.
static double gaussian (const double dIn)
 gaussian Gaussian interpolation function (sigma=1).
static double square (const double dIn)
 square Negative parabola interpolation function with y-offset of 1.
static double cubic (const double dIn)
 cubic Cubic hyperbola interpolation function.

Detailed Description

This class holds methods for creating distance-based weight matrices and for interpolating signals.

This class holds methods for creating distance-based weight matrices and for interpolating signals.

Definition at line 72 of file interpolation.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const Interpolation> DISP3DLIB::Interpolation::ConstSPtr

Definition at line 76 of file interpolation.h.

◆ SPtr

Definition at line 75 of file interpolation.h.

Constructor & Destructor Documentation

◆ Interpolation()

DISP3DLIB::Interpolation::Interpolation ( )
delete

Member Function Documentation

◆ createInterpolationMat()

QSharedPointer< SparseMatrix< float > > Interpolation::createInterpolationMat ( const Eigen::VectorXi & vecProjectedSensors,
const QSharedPointer< Eigen::MatrixXd > matDistanceTable,
double(* interpolationFunction )(double),
const double dCancelDist = FLOAT_INFINITY,
const Eigen::VectorXi & vecExcludeIndex = Eigen::VectorXi() )
static

createInterpolationMat Calculates the weight matrix for interpolation.

Parameters
[in]vecProjectedSensorsMesh vertex index of each sensor (one column per sensor).
[in]matDistanceTableDistance table (nVertices x nSensors), e.g. from GeometryInfo::scdc.
[in]interpolationFunctionDistance function whose inverse magnitude gives the weight.
[in]dCancelDistDistances at or above this value get zero weight.
[in]vecExcludeIndexSensor column indices that are not pinned to their own vertex.
Returns
Row-normalised sparse weight matrix (nVertices x nSensors), or an empty matrix if the table is empty.

Definition at line 43 of file interpolation.cpp.

◆ cubic()

double Interpolation::cubic ( const double dIn)
static

cubic Cubic hyperbola interpolation function.

Parameters
[in]dInInput distance.
Returns
dIn^3.

Definition at line 161 of file interpolation.cpp.

◆ gaussian()

double Interpolation::gaussian ( const double dIn)
static

gaussian Gaussian interpolation function (sigma=1).

Parameters
[in]dInInput distance.
Returns
exp(-dIn^2 / 2).

Definition at line 147 of file interpolation.cpp.

◆ interpolateSignal() [1/2]

Eigen::VectorXf DISP3DLIB::Interpolation::interpolateSignal ( const Eigen::SparseMatrix< float > & matInterpolationMatrix,
const Eigen::VectorXf & vecMeasurementData )
static

interpolateSignal Interpolates sensor data using the weight matrix (reference version).

Parameters
[in]matInterpolationMatrixWeight matrix (nVertices x nSensors).
[in]vecMeasurementDataSensor values (nSensors).
Returns
Interpolated vertex values, or an empty vector on dimension mismatch.

◆ interpolateSignal() [2/2]

Eigen::VectorXf DISP3DLIB::Interpolation::interpolateSignal ( const QSharedPointer< Eigen::SparseMatrix< float > > matInterpolationMatrix,
const QSharedPointer< Eigen::VectorXf > & vecMeasurementData )
static

interpolateSignal Interpolates sensor data using the weight matrix (shared pointer version).

Parameters
[in]matInterpolationMatrixWeight matrix (nVertices x nSensors).
[in]vecMeasurementDataSensor values (nSensors).
Returns
Interpolated vertex values, or an empty vector on dimension mismatch.

◆ linear()

double Interpolation::linear ( const double dIn)
static

linear Identity interpolation function.

Parameters
[in]dInInput distance.
Returns
dIn unchanged.

Definition at line 140 of file interpolation.cpp.

◆ square()

double Interpolation::square ( const double dIn)
static

square Negative parabola interpolation function with y-offset of 1.

Parameters
[in]dInInput distance.
Returns
max(1 - dIn^2 / 9, 0).

Definition at line 154 of file interpolation.cpp.


The documentation for this class was generated from the following files: