Declaration of the the gateway functions between MATLAB and C++. More...
Go to the source code of this file.
Functions | |
void | init_MSDM_options (MSDM_options &options) |
Initialize the various options of the MSDM estimation. More... | |
void | parse_MSDM_options (const mxArray *MATLAB_MSDM_options, MSDM_options &options) |
Parse MATLAB structure options and accordingly modify the MSDM option structure previously default intialized. More... | |
void | mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) |
Standard gateway between MATLAB and C++. More... | |
double | compute_MSDM (Polyhedron &p1, Polyhedron &p2, const MSDM_options &options, std::vector< double > &local_MSDM) |
Main computation procedure to estimate the MSDM between 2 meshes. More... | |
Declaration of the the gateway functions between MATLAB and C++.
double compute_MSDM | ( | Polyhedron & | p1, |
Polyhedron & | p2, | ||
const MSDM_options & | options, | ||
std::vector< double > & | local_MSDM | ||
) |
Main computation procedure to estimate the MSDM between 2 meshes.
p1 | Original polyhedron | |
p2 | Distorted polyhedron | |
options | Parameter settings | |
[out] | local_MSDM | vector of local MSDM value estimated at every vertex location |
See the MSDM paper for more details on the steps of the procedure.
void init_MSDM_options | ( | MSDM_options & | options | ) |
Initialize the various options of the MSDM estimation.
options | options of the MSDM whose values are initialized to the defaults |
Default values are indicated in the documentation on MSDM_options.
void mexFunction | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
const mxArray * | prhs[] | ||
) |
Standard gateway between MATLAB and C++.
*prhs[] | Pointer to right-hand side array of matrices in MATLAB (argument to the mex library) |
nrhs | Size of the prhs[] array |
*plhs[] | Pointer to left-hand side array of matrices in MATLAB (output to the mex library) |
nlhs | Size of the plhs[] array |
prhs[0] is a 3 by number-of-vertices MATLAB matrix of vertex locations and prhs[1] is a 3 by number-of-facet MATLAB matrix linking vertices to form triangle facets. prhs[2] and prhs[3] are the corresponding matrices for the distorted version of the mesh. prhs[4] is a scalar indicating the radius of the search. prhs[5] is optional and represents a MATLAB matrix with an option structure. Its field are detailed in the MSDM_option structure.
Prerequisite: the MSDM only works for polyhedron sharing the same connectivity, i.e. prhs[1] and prhs[3] shoud be identical.
void parse_MSDM_options | ( | const mxArray * | MATLAB_MSDM_options, |
MSDM_options & | options | ||
) |
Parse MATLAB structure options and accordingly modify the MSDM option structure previously default intialized.
MATLAB_MSDM_options | MSDM option structure (MATLAB style) that may be only partially filled |
options | MSDM option structure (C style) |