Namespaces | Classes | Functions

OpenTissue::t4mesh Namespace Reference

Namespaces

namespace  detail
namespace  mesh_coupling
namespace  tetgen

Classes

class  T4Mesh
class  t4mesh_core_access
struct  default_point_container
class  DefaultNodeTraits
class  DefaultTetrahedronTraits
class  DefaultT4EdgeTraits
class  DefaultT4FaceTraits
class  T4Face
class  T4BoundaryFaces
class  T4Edge
class  T4Edges
class  T4Node
class  T4Tetrahedron
struct  mesh_lofter_settings

Functions

template<typename point_container , typename t4mesh_type , typename real_type2 >
bool mel_write (std::string const &filename, t4mesh_type const &mesh, point_container &points, real_type2 scale)
template<typename t4mesh_type , typename real_type2 >
bool mel_write (std::string const &filename, t4mesh_type const &mesh, real_type2 scale)
template<typename point_container , typename t4mesh_type >
bool tetgen_read (const std::string &filename, t4mesh_type &mesh, point_container &points)
template<typename t4mesh_type >
bool tetgen_read (const std::string &filename, t4mesh_type &mesh)
template<typename point_container , typename t4mesh_type >
bool xml_read (std::string const &filename, t4mesh_type &mesh, point_container &points)
bool xml_has_tags (std::string const &filename)
template<typename t4mesh_type >
bool xml_read (std::string const &filename, t4mesh_type &mesh)
template<typename point_container , typename t4mesh_type >
bool xml_make_doc (TiXmlDocument &doc, t4mesh_type const &mesh, point_container &points)
template<typename point_container , typename t4mesh >
bool xml_write (std::string const &filename, t4mesh const &mesh, point_container &points)
template<typename t4mesh_type >
bool xml_write (std::string const &filename, t4mesh_type const &mesh)
template<typename real_type , typename t4mesh_type >
void generate_blocks (unsigned int const &I, unsigned int const &J, unsigned int const &K, real_type const &block_width, real_type const &block_height, real_type const &block_depth, t4mesh_type &mesh)
template<typename t4mesh_type , typename grid_type >
void generate_blocks (grid_type &voxels, t4mesh_type &mesh)
template<typename point_container , typename t4mesh_type , typename vector_type , typename quality_functor >
void compute_mesh_quality (t4mesh_type const &mesh, point_container &points, vector_type &Q, quality_functor const &F)
template<typename t4mesh_type , typename vector_type , typename quality_functor >
void compute_mesh_quality (t4mesh_type const &mesh, vector_type &Q, quality_functor const &F)
template<typename Points , typename t4mesh_type >
void delaunay_tetrahedralization (Points &points, t4mesh_type &output)
template<typename mesh_type , typename t4mesh_type >
void delaunay_from_surface_tetrahedralization (mesh_type const &input, t4mesh_type &output)
template<typename volume_mesh , typename point_container >
void remove_redundant_nodes (volume_mesh &A, point_container const &pointsA, volume_mesh &B, point_container &pointsB, double precision=10e-7)
template<typename volume_mesh >
void remove_redundant_nodes (volume_mesh &A, volume_mesh &B, double precision=10e-7)
template<typename t4mesh_type , typename polymesh_type >
bool mesh_lofter (t4mesh_type &t4mesh, const polymesh_type &polymesh, const mesh_lofter_settings &settings=mesh_lofter_settings())

Function Documentation

template<typename point_container , typename t4mesh_type , typename vector_type , typename quality_functor >
void OpenTissue::t4mesh::compute_mesh_quality ( t4mesh_type const &  mesh,
point_container points,
vector_type Q,
quality_functor const &  F 
) [inline]

Compute Mesh Quality Vector.

Parameters:
mesh A tetrahedra mesh containing the topology of the tetrahedrons.
points A containing holding the coordinates of the tetrahedra nodes.
Q Upon return each entry holds the quality measure of a thetrahedron.
F Quality measure functor.
template<typename t4mesh_type , typename vector_type , typename quality_functor >
void OpenTissue::t4mesh::compute_mesh_quality ( t4mesh_type const &  mesh,
vector_type Q,
quality_functor const &  F 
) [inline]

Compute Mesh Quality Vector.

Parameters:
mesh A tetrahedra mesh containing the topology of the tetrahedrons.
Q Upon return each entry holds the quality measure of a thetrahedron.
F Quality measure functor.
template<typename mesh_type , typename t4mesh_type >
void OpenTissue::t4mesh::delaunay_from_surface_tetrahedralization ( mesh_type const &  input,
t4mesh_type &  output 
)

Delaynay Surface Tetrahedralization.

Parameters:
surface The input surface. The vertex coordinates are extracted and used for making a Delaunay tetrahedralization.
output Upon return this argument holds the resulting Delaynay tetrahedralization.
template<typename Points , typename t4mesh_type >
void OpenTissue::t4mesh::delaunay_tetrahedralization ( Points &  points,
t4mesh_type &  output 
)

Delaynay Tesselator. This utility method provides a wrapper interface for QHull, which performs a delaynay triangulation a given set of points.

Parameters:
points A container of Vector3<double> points, these will be the nodes in the resulting tetrahedral mesh.
mesh A tetrahedral mesh, upon return this will contain the resulting triangulation. It is expected that the mesh data structure conforms with the t4mesh.
template<typename t4mesh_type , typename grid_type >
void OpenTissue::t4mesh::generate_blocks ( grid_type voxels,
t4mesh_type &  mesh 
)

t4mesh Block Generator for voxelized data.

Parameters:
voxels A voxelized map, indicating where to generate tetrahedra.
mesh A generic t4mesh, which upon return holds the generated mesh.
template<typename real_type , typename t4mesh_type >
void OpenTissue::t4mesh::generate_blocks ( unsigned int const &  I,
unsigned int const &  J,
unsigned int const &  K,
real_type const &  block_width,
real_type const &  block_height,
real_type const &  block_depth,
t4mesh_type &  mesh 
)

t4mesh Block Generator.

Parameters:
I The number of blocks along x axis.
J The number of blocks along y axis.
K The number of blocks along z axis.
block_width The edgelength of the blocks along x-axis.
block_height The edgelength of the blocks along x-axis.
block_depth The edgelength of the blocks along x-axis.
mesh A generic t4mesh, which upon return holds the generated mesh.
template<typename point_container , typename t4mesh_type , typename real_type2 >
bool OpenTissue::t4mesh::mel_write ( std::string const &  filename,
t4mesh_type const &  mesh,
point_container points,
real_type2  scale 
) [inline]

MEL Write Routine. This function is great for exporting a visual representation of a tetrahedra mesh into a MEL (Maya Embedded Language) file. A MEL file is a script file that can be run in Maya. The output file will thus create polygonal meshes corresponding to the individual tetrahedrons in the tetrahedron mesh.

Parameters:
filename The filename to write to.
mesh The tetrahedra mesh that should be written
points The coordinates of the nodes of the tetrahedra mesh.
scale The individual scaling to be used upon each tetrahedron.
Returns:
If succesfully written to the specified file then the return value is true otherwise it is false.
template<typename t4mesh_type , typename real_type2 >
bool OpenTissue::t4mesh::mel_write ( std::string const &  filename,
t4mesh_type const &  mesh,
real_type2  scale 
) [inline]

MEL Write Routine. This function is great for exporting a visual representation of a tetrahedra mesh into a MEL (Maya Embedded Language) file. A MEL file is a script file that can be run in Maya. The output file will thus create polygonal meshes corresponding to the individual tetrahedrons in the tetrahedron mesh.

Parameters:
filename The filename to write to.
mesh The tetrahedra mesh that should be written
scale The individual scaling to be used upon each tetrahedron.
Returns:
If succesfully written to the specified file then the return value is true otherwise it is false.
template<typename t4mesh_type , typename polymesh_type >
bool OpenTissue::t4mesh::mesh_lofter ( t4mesh_type &  t4mesh,
const polymesh_type &  polymesh,
const mesh_lofter_settings &  settings = mesh_lofter_settings() 
)

t4mesh_mesh_lofter.

  • uses tetgen to loft/extrude a closed two-manifold polymesh to a generic tetrahedal mesh
Parameters:
polymesh A poly mesh, which holds a closed two-manifold.
t4mesh A generic t4mesh, which upon return holds the generated tetrahedal mesh.
settings The settings/configuration for TetGen, can be omitted to use the default settings.
template<typename volume_mesh , typename point_container >
void OpenTissue::t4mesh::remove_redundant_nodes ( volume_mesh &  A,
point_container const &  pointsA,
volume_mesh &  B,
point_container pointsB,
double  precision = 10e-7 
)

Remove Redundant Nodes.

This function assumes that default traits are available, i.e. a node has an m_coord member of vector3_type.

Parameters:
A The volume mesh from which redundant nodes are to be removed.
B The result volume mesh without any redundant nodes.
precision Precision is maximum distance between two nodes that should be merged into one.
template<typename volume_mesh >
void OpenTissue::t4mesh::remove_redundant_nodes ( volume_mesh &  A,
volume_mesh &  B,
double  precision = 10e-7 
)
template<typename point_container , typename t4mesh_type >
bool OpenTissue::t4mesh::tetgen_read ( const std::string filename,
t4mesh_type &  mesh,
point_container points 
)

Read TetGen Method.

Parameters:
filename The path and filename of the tetgen file to be read (without extensions).
mesh The mesh which the file data is read into.
Returns:
A boolean indicating success or failure.
template<typename t4mesh_type >
bool OpenTissue::t4mesh::tetgen_read ( const std::string filename,
t4mesh_type &  mesh 
)

Read TetGen Method.

Parameters:
filename The path and filename of the tetgen file to be read (without extensions).
mesh The mesh which the file data is read into.
Returns:
A boolean indicating success or failure.
bool OpenTissue::t4mesh::xml_has_tags ( std::string const &  filename  )  [inline]

Check whether the xml document has tags assigned to the nodes

Parameters:
filename The path and filename of the xml file to be checked.
Returns:
true if tags present
template<typename point_container , typename t4mesh_type >
bool OpenTissue::t4mesh::xml_make_doc ( TiXmlDocument doc,
t4mesh_type const &  mesh,
point_container points 
)
template<typename t4mesh_type >
bool OpenTissue::t4mesh::xml_read ( std::string const &  filename,
t4mesh_type &  mesh 
)

Read XML Method, convenience call with coordinates read into node->m_coord.

Parameters:
filename The path and filename of the xml file to be read.
mesh The mesh which the file data is read into.
Returns:
A boolean indicating success or failure.
template<typename point_container , typename t4mesh_type >
bool OpenTissue::t4mesh::xml_read ( std::string const &  filename,
t4mesh_type &  mesh,
point_container points 
)

Read XML Method, with point container for node positions.

Parameters:
filename The path and filename of the tetgen file to be read (without extensions).
mesh The mesh which the file data is read into.
points The node positions will be read into this container.
Returns:
A boolean indicating success or failure.
template<typename t4mesh_type >
bool OpenTissue::t4mesh::xml_write ( std::string const &  filename,
t4mesh_type const &  mesh 
)

XML Write Routine, default version where node->m_coord is assumed.

Parameters:
filename File to write to.
mesh Mesh to be serialized.
Returns:
If successfully written to the specified file then the return value is true otherwise it is false.
template<typename point_container , typename t4mesh >
bool OpenTissue::t4mesh::xml_write ( std::string const &  filename,
t4mesh const &  mesh,
point_container points 
)

Write t4mesh to XML file.

Parameters:
filename File to write to.
mesh Mesh to be serialized.
points Node coordinates will be read from this container.
Returns:
If succesfully written to the specified file then the return value is true otherwise it is false.