C2DPPDivcurlMatrix Class Reference
Image Registration and Transformation

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 ()

## Detailed Description

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.

Todo
  Optimize like the 3D version that only stores the patch of required values instead of building the whole diagonals

Definition at line 40 of file 2d/ppmatrix.hh.

## Constructor & Destructor Documentation

## C2DPPDivcurlMatrix()

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

Parameters

  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::~C2DPPDivcurlMatrix | ( |  | ) |

## Member Function Documentation

## evaluate() [1/2]

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\)

Parameters

  | coefficients | B-Spline coefficient field c
  [out] | gradient | gradient of the divcurl cost

Returns
  \(<c^T, P, c>\)

## evaluate() [2/2]

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

Parameters

  | coefficients | B-Spline coefficient field c
  [out] | gradient | gradient of the divcurl cost

Returns
  \(<c^T, P, c>\)

## get_size()

const C2DBounds & C2DPPDivcurlMatrix::get_size | ( |  | ) | const

Returns
  fild size this matrix was created for

## operator*() [1/2]

double C2DPPDivcurlMatrix::operator* | ( | const C2DFVectorfield & | coefficients | ) | const

Given this matrix P and the coefficient field c evaluate the value for \(c^T P c\)

Parameters

  coefficients | B-Spline coefficient field c

Returns
  \(<c^T, P, c>\)

## operator*() [2/2]

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\)

Parameters

  coefficients | B-Spline coefficient field c

Returns
  \(<c^T, P, c>\)

## reset()

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)

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

- 2d/ppmatrix.hh