Precomputed matrix for the DivCurl regularization. More...
#include <mia/2d/ppmatrix.hh>
Public Member Functions | |
C2DPPDivcurlMatrix (const C2DBounds &size, const C2DFVector &range, const CSplineKernel &kernel, double wd, double wr) | |
double | evaluate (const C2DFVectorfield &coefficients, CDoubleVector &gradient) const |
double | evaluate (const T2DDatafield< C2DDVector > &coefficients, CDoubleVector &gradient) const |
const C2DBounds & | get_size () const |
double | operator* (const C2DFVectorfield &coefficients) const |
double | operator* (const T2DDatafield< C2DDVector > &coefficients) const |
void | reset (const C2DBounds &size, const C2DFVector &range, const CSplineKernel &kernel, double wd, double wr) |
~C2DPPDivcurlMatrix () | |
Precomputed matrix for the DivCurl regularization.
Precomputed Matrix for the DivCurl regularization. This class stores the precomputed matrix for the divcurl regislarization of a spline based transformation.
Definition at line 40 of file 2d/ppmatrix.hh.
C2DPPDivcurlMatrix::C2DPPDivcurlMatrix | ( | const C2DBounds & | size, |
const C2DFVector & | range, | ||
const CSplineKernel & | kernel, | ||
double | wd, | ||
double | wr | ||
) |
Construct the matrix according to the given coefficient field size, the used B-Spline kernel and the divergence and rotational weights
size | coefficient field size |
range | full data range |
kernel | B-Spline kernel used for the transformation |
wd | weight for divergence |
wr | weight for rotation (curl) |
C2DPPDivcurlMatrix::~C2DPPDivcurlMatrix | ( | ) |
double C2DPPDivcurlMatrix::evaluate | ( | const C2DFVectorfield & | coefficients, |
CDoubleVector & | gradient | ||
) | const |
Given this matrix P and the coefficient field c evaluate the value for \(c^T P c\)
coefficients | B-Spline coefficient field c | |
[out] | gradient | gradient of the divcurl cost |
double C2DPPDivcurlMatrix::evaluate | ( | const T2DDatafield< C2DDVector > & | coefficients, |
CDoubleVector & | gradient | ||
) | const |
Given this matrix P and the coefficient field c evaluate the value for \(c^T P c\) Specialization for double valued vectors
coefficients | B-Spline coefficient field c | |
[out] | gradient | gradient of the divcurl cost |
const C2DBounds& C2DPPDivcurlMatrix::get_size | ( | ) | const |
double C2DPPDivcurlMatrix::operator* | ( | const C2DFVectorfield & | coefficients | ) | const |
Given this matrix P and the coefficient field c evaluate the value for \(c^T P c\)
coefficients | B-Spline coefficient field c |
double C2DPPDivcurlMatrix::operator* | ( | const T2DDatafield< C2DDVector > & | coefficients | ) | const |
Given this matrix P and the coefficient field c evaluate the value for \(c^T P c\)
coefficients | B-Spline coefficient field c |
void C2DPPDivcurlMatrix::reset | ( | const C2DBounds & | size, |
const C2DFVector & | range, | ||
const CSplineKernel & | kernel, | ||
double | wd, | ||
double | wr | ||
) |
re-initialize the matrix (if the values are changed)