Volume Cartographer 2.27.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Functions
Parameterization

Mesh parameterizations/UV maps. More...

Collaboration diagram for Parameterization:

Classes

class  volcart::texturing::AngleBasedFlattening
 Parameterize a mesh using ABF++. More...
 
struct  volcart::texturing::LStretchMetrics
 L stretch error metric output struct. More...
 
class  volcart::texturing::OrthographicProjectionFlattening
 Computes a 2D parameterization of a triangular mesh using orthographic projection. More...
 

Functions

template<typename ErrContainer >
cv::Mat volcart::texturing::PlotPerFaceError (const cv::Mat &cellMap, const ErrContainer &errorMap, float defaultValue=0)
 Plot generic per-face error information into an image. More...
 
LStretchMetrics volcart::texturing::LStretch (const ITKMesh::Pointer &mesh3D, const ITKMesh::Pointer &mesh2D)
 Calculate the L2 and LInf stretch between a 2D and 3D mesh. More...
 
std::vector< cv::Mat > volcart::texturing::PlotLStretchError (const LStretchMetrics &metrics, const cv::Mat &cellMap, ColorMap cm=ColorMap::Plasma, bool drawLegend=false)
 Plot per-face L stretch error metrics. More...
 

Detailed Description

Mesh parameterizations/UV maps.

Function Documentation

◆ LStretch()

LStretchMetrics volcart::texturing::LStretch ( const ITKMesh::Pointer &  mesh3D,
const ITKMesh::Pointer &  mesh2D 
)

Calculate the L2 and LInf stretch between a 2D and 3D mesh.

Calculates the L2 and LInf stretch norms from "Texture Mapping Progressive Meshes" by Sander et al. [sander2001texture]. See LStretchMetrics for more info on these metrics. Meshes are assumed to be pre-scaled to have the same surface area.

◆ PlotLStretchError()

std::vector< cv::Mat > volcart::texturing::PlotLStretchError ( const LStretchMetrics metrics,
const cv::Mat &  cellMap,
ColorMap  cm = ColorMap::Plasma,
bool  drawLegend = false 
)

Plot per-face L stretch error metrics.

This function maps per-face LStretchMetrics to a 2D image using the provided cell map. If drawLegend is true, a legend bar will be appended to the bottom of the image showing the metric label, global metric, and color map scale bar.

◆ PlotPerFaceError()

template<typename ErrContainer >
cv::Mat volcart::texturing::PlotPerFaceError ( const cv::Mat &  cellMap,
const ErrContainer &  errorMap,
float  defaultValue = 0 
)

Plot generic per-face error information into an image.

Template Parameters
ErrContainerContainer type supporting the .at() accessor. Return values must support static_cast to float.
Parameters
cellMapCell map image produced by PPMGenerator or GenerateCellMap
errorMapContainer of per-face error values
defaultValueDefault pixel value if it doesn't have a cell mapping
Returns
Image of error plot with type CV_32FC1

Definition at line 27 of file FlatteningError.hpp.