OMToolkit
1.0
The polygonal mesh processing tool.
|
#include <OMFilter.h>
Public Member Functions | |
OMFilter (Mesh *mesh) | |
bool | LoadFile (std::string filename) |
bool | SaveFile (std::string filename) |
bool | FilterAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | WeightAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | MeanAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | MedianAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | MinAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | MaxAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | AbsAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
bool | VarianceAll (const OpenMesh::VPropHandleT< MatrixT > &matrixHandle) |
Protected Types | |
typedef MatrixT::Scalar | Scalar |
Class filtering informations saved in vertex projection matrix
Mesh | Mesh type to work with |
MatrixT | Type of vertex matrix property |
|
protected |
Scalar type in matrices
OMFilter::OMFilter | ( | Mesh * | mesh | ) |
Constructor - initializes vital variables and makes a liaison with target mesh
mesh | Mesh to work with |
bool OMFilter::AbsAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Saves a max distance of attached vertex matrix from a plane into attribute vector Save is done by push back
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::FilterAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Filters matrices attached to each vertex and returns value in the middle Provides only fast filtering - computes only value in the middle of a matrix Vertex matrix must have the same size asi filter kernel Kernel must be loaded from file before calling this function Result is saved into attribute vector (push back) If there is multiple filtering kernels, result is computed as eucleidian norm of result vector (result = sqrt(x^2 + y^2 + ... + z^2))
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::LoadFile | ( | std::string | filename | ) |
Function loads a file with saved filter matrix File can contain multiple matrices - all are loaded Structure of a file is following:
Matrix 2 2 3 4 1 2
First row contains keyword Matrix with specified dimensions, the other rows contains values After this, another header can follow with second matrix
filename | File name |
bool OMFilter::MaxAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Saves maximal value of attached vertex matrix into attribute vector Save is done by push back
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::MeanAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Saves mean value of attached vertex matrix into attribute vector Save is done by push back
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::MedianAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Saves median value of attached vertex matrix into attribute vector Save is done by push back
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::MinAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Saves minimal value of attached vertex matrix into attribute vector Save is done by push back
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::SaveFile | ( | std::string | filename | ) |
Function saves internal matrices into file
filename | File name |
bool OMFilter::VarianceAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Saves a variance of attached vertex matrix from a plane into attribute vector Save is done by push back
matrixHandle | Handle to a matrix - universal property handle |
bool OMFilter::WeightAll | ( | const OpenMesh::VPropHandleT< MatrixT > & | matrixHandle | ) |
Multiplies each element of the matrix with corresponding weight in filter matrix Vertex matrix must have the same size asi filter kernel Kernel must be loaded from file before calling this function If there is multiple filtering kernels, weighting is computed in series
matrixHandle | Handle to a matrix - universal property handle |