OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OMToolkit::OMVisualiser< Mesh, Scalar > Class Template Reference

#include <OMVisualiser.h>

Public Member Functions

 OMVisualiser (Mesh *mesh)
 
void ComputeColors (OpenMesh::VPropHandleT< Scalar > vertexProperty, Scalar ommitExtremaPercent)
 
void ComputeColors (OpenMesh::FPropHandleT< Scalar > faceProperty, Scalar ommitExtremaPercent)
 
void getLegend (Scalar &maxBlue, Scalar &maxGreen, Scalar &maxRed)
 

Protected Member Functions

OpenMesh::Vec4uc getColor (Scalar current)
 

Protected Attributes

Mesh * m_mesh
 
OpenMesh::IO::ImporterT< Mesh > importer
 
Scalar m_maxRed
 
Scalar m_maxGreen
 
Scalar m_maxBlue
 
Scalar m_Difference
 

Detailed Description

template<class Mesh, class Scalar>
class OMToolkit::OMVisualiser< Mesh, Scalar >

Class computing a mesh color from specified scalar attributes

Template Parameters
MeshSpecifies a mesh type to work with
ScalarSpecifies a scalar type of attribute (Attention, class expects a scalar type!!)

Constructor & Destructor Documentation

template<class Mesh, class Scalar>
OMVisualiser::OMVisualiser ( Mesh *  mesh)

Constructor - creates a link to a mesh and initializes variables

Parameters
meshPointer to a mesh

Member Function Documentation

template<class Mesh, class Scalar>
void OMVisualiser::ComputeColors ( OpenMesh::VPropHandleT< Scalar >  vertexProperty,
Scalar  ommitExtremaPercent 
)

Computes colors from a vertex scalar property and saves them into mesh

Parameters
vertexPropertyHandle to a property, from which we will compute colors
ommitExtremaPercentNumber of percent which will be ommited from extrema (for ex. value 2.0 ommits 2% of brightest and darkest points)
template<class Mesh, class Scalar>
void OMVisualiser::ComputeColors ( OpenMesh::FPropHandleT< Scalar >  faceProperty,
Scalar  ommitExtremaPercent 
)

Computes colors from a face scalar property and saves them into mesh

Parameters
vertexPropertyHandle to a property, from which we will compute colors
ommitExtremaPercentNumber of percent which will be ommited from extrema (for ex. value 2.0 ommits 2% of brightest and darkest points)
template<class Mesh, class Scalar>
OpenMesh::Vec4uc OMVisualiser::getColor ( Scalar  current)
protected

Method computes a color from given value

Parameters
currentProperty value
Returns
Color vector
template<class Mesh, class Scalar>
void OMVisualiser::getLegend ( Scalar &  maxBlue,
Scalar &  maxGreen,
Scalar &  maxRed 
)

Returns values of Red, Green and Blue extremas (for painting a legend)

Parameters
maxBlueProperty value for (0, 0, 255, 255) color
maxGreenProperty value for (0, 255, 0, 255) color
maxRedProperty value for (255, 0, 0, 255) color

Member Data Documentation

template<class Mesh, class Scalar>
OpenMesh::IO::ImporterT<Mesh> OMToolkit::OMVisualiser< Mesh, Scalar >::importer
protected

Importer for mesh saving

template<class Mesh, class Scalar>
Scalar OMToolkit::OMVisualiser< Mesh, Scalar >::m_Difference
protected

Difference between real values and shifted ones

template<class Mesh, class Scalar>
Scalar OMToolkit::OMVisualiser< Mesh, Scalar >::m_maxBlue
protected

intern blue maximum

template<class Mesh, class Scalar>
Scalar OMToolkit::OMVisualiser< Mesh, Scalar >::m_maxGreen
protected

Intern green maximum

template<class Mesh, class Scalar>
Scalar OMToolkit::OMVisualiser< Mesh, Scalar >::m_maxRed
protected

Intern red maximum

template<class Mesh, class Scalar>
Mesh* OMToolkit::OMVisualiser< Mesh, Scalar >::m_mesh
protected

Intern pointer to a mesh


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