TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ttk::BarycentricSubdivision Class Reference

Subdivise a triangulation according to triangle barycenter. More...

#include <BarycentricSubdivision.h>

Inheritance diagram for ttk::BarycentricSubdivision:
ttk::Debug ttk::BaseClass ttkBarycentricSubdivision

Public Member Functions

 BarycentricSubdivision ()
 
void preconditionTriangulation (AbstractTriangulation *const triangulation)
 
SimplexId getNumberOfVertices () const
 Return the number of vertices in the output triangulation.
 
SimplexId getNumberOfTriangles () const
 Return the number of triangles in the output triangulation.
 
template<typename triangulationType >
int execute (const triangulationType &inputTriangl, ExplicitTriangulation &outputTriangl)
 
template<typename T , typename triangulationType >
int interpolateContinuousScalarField (const T *data, T *output, const triangulationType &inputTriangl) const
 Interpolate floating-point point data on subdivised triangulation.
 
template<typename T >
int interpolateDiscreteScalarField (const T *data, T *output) const
 Interpolate integer point data on subdivised triangulation.
 
template<typename T >
int interpolateCellDataField (const T *data, T *output) const
 Interpolate cell data on subdivised triangulation.
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Attributes

std::vector< float > points_
 
std::vector< LongSimplexIdcells_connectivity_
 
std::vector< LongSimplexIdcells_offsets_
 
std::vector< SimplexIdpointId_
 
std::vector< SimplexIdpointDim_
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

Subdivise a triangulation according to triangle barycenter.

Author
Pierre Guillou (pierr.nosp@m.e.gu.nosp@m.illou.nosp@m.@lip.nosp@m.6.fr)
Date
July 2019

BarycentricSubdivision generates a new, finer triangulation from an input triangulation. Every triangle is divided in six new triangles using the 3 edges middles and the triangle barycenter.

Scalar data on vertices (point data) with continuous values (float/double) can be interpolated on the new triangulation. Scalar data on input triangles can be replicated on the new triangles.

See also
ttk::Triangulation
ttkBarycentricSubdivision.cpp for a usage example.

Definition at line 31 of file BarycentricSubdivision.h.

Constructor & Destructor Documentation

◆ BarycentricSubdivision()

ttk::BarycentricSubdivision::BarycentricSubdivision ( )
inline

Definition at line 34 of file BarycentricSubdivision.h.

Member Function Documentation

◆ execute()

template<typename triangulationType >
int ttk::BarycentricSubdivision::execute ( const triangulationType &  inputTriangl,
ttk::ExplicitTriangulation outputTriangl 
)

Definition at line 313 of file BarycentricSubdivision.h.

◆ getNumberOfTriangles()

SimplexId ttk::BarycentricSubdivision::getNumberOfTriangles ( ) const
inline

Return the number of triangles in the output triangulation.

Definition at line 60 of file BarycentricSubdivision.h.

◆ getNumberOfVertices()

SimplexId ttk::BarycentricSubdivision::getNumberOfVertices ( ) const
inline

Return the number of vertices in the output triangulation.

Definition at line 54 of file BarycentricSubdivision.h.

◆ interpolateCellDataField()

template<typename T >
int ttk::BarycentricSubdivision::interpolateCellDataField ( const T *  data,
T *  output 
) const
inline

Interpolate cell data on subdivised triangulation.

Copy parent triangle value on the six children triangles.

Parameters
[in]dataPointer to input data on parent triangulation
[out]outputAllocated buffer to be filled
Returns
0 in case of success

Definition at line 146 of file BarycentricSubdivision.h.

◆ interpolateContinuousScalarField()

template<typename T , typename triangulationType >
int ttk::BarycentricSubdivision::interpolateContinuousScalarField ( const T *  data,
T *  output,
const triangulationType &  inputTriangl 
) const
inline

Interpolate floating-point point data on subdivised triangulation.

Copy values on parent vertices, interpolate on edges and barycenters

Parameters
[in]dataPointer to input data on parent triangulation
[out]outputAllocated buffer to be filled
[in]inputTrianglInput triangulation object
Returns
0 in case of success

Definition at line 80 of file BarycentricSubdivision.h.

◆ interpolateDiscreteScalarField()

template<typename T >
int ttk::BarycentricSubdivision::interpolateDiscreteScalarField ( const T *  data,
T *  output 
) const
inline

Interpolate integer point data on subdivised triangulation.

Copy values on parent vertices, put 0 elsewhere.

Parameters
[in]dataPointer to input data on parent triangulation
[out]outputAllocated buffer to be filled
Returns
0 in case of success

Definition at line 123 of file BarycentricSubdivision.h.

◆ preconditionTriangulation()

void ttk::BarycentricSubdivision::preconditionTriangulation ( AbstractTriangulation *const  triangulation)
inline

Definition at line 39 of file BarycentricSubdivision.h.

Member Data Documentation

◆ cells_connectivity_

std::vector<LongSimplexId> ttk::BarycentricSubdivision::cells_connectivity_
protected

Definition at line 180 of file BarycentricSubdivision.h.

◆ cells_offsets_

std::vector<LongSimplexId> ttk::BarycentricSubdivision::cells_offsets_
protected

Definition at line 181 of file BarycentricSubdivision.h.

◆ pointDim_

std::vector<SimplexId> ttk::BarycentricSubdivision::pointDim_
protected

Definition at line 186 of file BarycentricSubdivision.h.

◆ pointId_

std::vector<SimplexId> ttk::BarycentricSubdivision::pointId_
protected

Definition at line 183 of file BarycentricSubdivision.h.

◆ points_

std::vector<float> ttk::BarycentricSubdivision::points_
protected

Definition at line 178 of file BarycentricSubdivision.h.


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