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

TTK processing package for the computation of critical points in PL scalar fields defined on PL manifolds. More...

#include <ScalarFieldCriticalPoints.h>

Inheritance diagram for ttk::ScalarFieldCriticalPoints:
ttk::Debug ttk::BaseClass ttkScalarFieldCriticalPoints

Public Types

enum class  BACKEND { GENERIC = 0 , PROGRESSIVE_TOPOLOGY = 1 }
 

Public Member Functions

 ScalarFieldCriticalPoints ()
 
template<class triangulationType = AbstractTriangulation>
int execute (const SimplexId *const offsets, const triangulationType *triangulation)
 
template<class triangulationType = AbstractTriangulation>
int executeLegacy (const SimplexId *const offsets, const triangulationType *triangulation)
 
template<class triangulationType = AbstractTriangulation>
int executeProgressive (const SimplexId *const offsets, const triangulationType *triangulation)
 
template<class triangulationType >
void checkProgressivityRequirement (const triangulationType *triangulation)
 
template<class triangulationType = AbstractTriangulation>
int getLowerUpperComponents (const SimplexId vertexId, const SimplexId *const offsets, const triangulationType *triangulation, bool &isLowerOnBoundary, bool &isUpperOnBoundary, std::vector< std::vector< ttk::SimplexId > > *upperComponents, std::vector< std::vector< ttk::SimplexId > > *lowerComponents) const
 
template<class triangulationType = AbstractTriangulation>
char getCriticalType (const SimplexId &vertexId, const SimplexId *const offsets, const triangulationType *triangulation, std::vector< std::vector< ttk::SimplexId > > *upperComponents=nullptr, std::vector< std::vector< ttk::SimplexId > > *lowerComponents=nullptr) const
 
char getCriticalType (const SimplexId &vertexId, const SimplexId *const offsets, const std::vector< std::pair< SimplexId, SimplexId > > &vertexLinkEdgeList) const
 
void setDomainDimension (const int &dimension)
 
void setOutput (std::vector< std::pair< SimplexId, char > > *criticalPoints)
 
void preconditionTriangulation (AbstractTriangulation *triangulation)
 
void setVertexLinkEdgeLists (const std::vector< std::vector< std::pair< SimplexId, SimplexId > > > *edgeList)
 
int setVertexNumber (const SimplexId &vertexNumber)
 
void setNonManifold (const bool b)
 
void displayStats ()
 
template<class triangulationType >
void checkProgressivityRequirement (const triangulationType *ttkNotUsed(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

int dimension_ {}
 
SimplexId vertexNumber_ {}
 
const std::vector< std::vector< std::pair< SimplexId, SimplexId > > > * vertexLinkEdgeLists_ {}
 
std::vector< std::pair< SimplexId, char > > * criticalPoints_ {}
 
bool forceNonManifoldCheck {false}
 
BACKEND BackEnd {BACKEND::PROGRESSIVE_TOPOLOGY}
 
ProgressiveTopology progT_ {}
 
int StartingResolutionLevel {0}
 
int StoppingResolutionLevel {-1}
 
bool IsResumable {false}
 
double TimeLimit {}
 
- 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

TTK processing package for the computation of critical points in PL scalar fields defined on PL manifolds.

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Date
June 2015.

This class computes the list of critical points of the input scalar field and classify them according to their type.

Parameters
dataTypeData type of the input scalar field (char, float, etc.).

Related publication
"Critical points and curvature for embedded polyhedral surfaces"
Thomas Banchoff
American Mathematical Monthly, 1970.

Progressive Approach used by default Related publication
"A Progressive Approach to Scalar Field Topology"
Jules Vidal, Pierre Guillou, Julien Tierny
IEEE Transactions on Visualization and Computer Graphics, 2021

See also
ttkScalarFieldCriticalPoints.cpp for a usage example.

Online examples:

Definition at line 58 of file ScalarFieldCriticalPoints.h.

Member Enumeration Documentation

◆ BACKEND

Enumerator
GENERIC 
PROGRESSIVE_TOPOLOGY 

Definition at line 63 of file ScalarFieldCriticalPoints.h.

Constructor & Destructor Documentation

◆ ScalarFieldCriticalPoints()

ttk::ScalarFieldCriticalPoints::ScalarFieldCriticalPoints ( )

Definition at line 3 of file ScalarFieldCriticalPoints.cpp.

Member Function Documentation

◆ checkProgressivityRequirement() [1/2]

template<class triangulationType >
void ttk::ScalarFieldCriticalPoints::checkProgressivityRequirement ( const triangulationType *  triangulation)

◆ checkProgressivityRequirement() [2/2]

template<class triangulationType >
void ttk::ScalarFieldCriticalPoints::checkProgressivityRequirement ( const triangulationType *  ttkNotUsedtriangulation)

Definition at line 613 of file ScalarFieldCriticalPoints.h.

◆ displayStats()

void ttk::ScalarFieldCriticalPoints::displayStats ( )

Definition at line 198 of file ScalarFieldCriticalPoints.cpp.

◆ execute()

template<class triangulationType >
int ttk::ScalarFieldCriticalPoints::execute ( const SimplexId *const  offsets,
const triangulationType *  triangulation 
)

Execute the package.

Parameters
offsetsPointer to order field on vertices
triangulationTriangulation
Returns
Returns 0 upon success, negative values otherwise.
Precondition
For this function to behave correctly in the absence of the VTK wrapper, ttk::preconditionOrderArray() needs to be called to fill the offsets buffer prior to any computation (the VTK wrapper already includes a mechanism to automatically generate such a preconditioned buffer).
See also
examples/c++/main.cpp for an example use.

Definition at line 181 of file ScalarFieldCriticalPoints.h.

◆ executeLegacy()

template<class triangulationType >
int ttk::ScalarFieldCriticalPoints::executeLegacy ( const SimplexId *const  offsets,
const triangulationType *  triangulation 
)

Definition at line 225 of file ScalarFieldCriticalPoints.h.

◆ executeProgressive()

template<class triangulationType >
int ttk::ScalarFieldCriticalPoints::executeProgressive ( const SimplexId *const  offsets,
const triangulationType *  triangulation 
)

Definition at line 205 of file ScalarFieldCriticalPoints.h.

◆ getCriticalType() [1/2]

char ttk::ScalarFieldCriticalPoints::getCriticalType ( const SimplexId vertexId,
const SimplexId *const  offsets,
const std::vector< std::pair< SimplexId, SimplexId > > &  vertexLinkEdgeList 
) const

Definition at line 10 of file ScalarFieldCriticalPoints.cpp.

◆ getCriticalType() [2/2]

template<class triangulationType >
char ttk::ScalarFieldCriticalPoints::getCriticalType ( const SimplexId vertexId,
const SimplexId *const  offsets,
const triangulationType *  triangulation,
std::vector< std::vector< ttk::SimplexId > > *  upperComponents = nullptr,
std::vector< std::vector< ttk::SimplexId > > *  lowerComponents = nullptr 
) const

Definition at line 531 of file ScalarFieldCriticalPoints.h.

◆ getLowerUpperComponents()

template<class triangulationType >
int ttk::ScalarFieldCriticalPoints::getLowerUpperComponents ( const SimplexId  vertexId,
const SimplexId *const  offsets,
const triangulationType *  triangulation,
bool &  isLowerOnBoundary,
bool &  isUpperOnBoundary,
std::vector< std::vector< ttk::SimplexId > > *  upperComponents,
std::vector< std::vector< ttk::SimplexId > > *  lowerComponents 
) const

Definition at line 368 of file ScalarFieldCriticalPoints.h.

◆ preconditionTriangulation()

void ttk::ScalarFieldCriticalPoints::preconditionTriangulation ( AbstractTriangulation triangulation)
inline

Definition at line 128 of file ScalarFieldCriticalPoints.h.

◆ setDomainDimension()

void ttk::ScalarFieldCriticalPoints::setDomainDimension ( const int &  dimension)
inline

Definition at line 118 of file ScalarFieldCriticalPoints.h.

◆ setNonManifold()

void ttk::ScalarFieldCriticalPoints::setNonManifold ( const bool  b)
inline

Definition at line 154 of file ScalarFieldCriticalPoints.h.

◆ setOutput()

void ttk::ScalarFieldCriticalPoints::setOutput ( std::vector< std::pair< SimplexId, char > > *  criticalPoints)
inline

Definition at line 123 of file ScalarFieldCriticalPoints.h.

◆ setVertexLinkEdgeLists()

void ttk::ScalarFieldCriticalPoints::setVertexLinkEdgeLists ( const std::vector< std::vector< std::pair< SimplexId, SimplexId > > > *  edgeList)
inline

Definition at line 140 of file ScalarFieldCriticalPoints.h.

◆ setVertexNumber()

int ttk::ScalarFieldCriticalPoints::setVertexNumber ( const SimplexId vertexNumber)
inline

Set the number of vertices in the scalar field.

Parameters
vertexNumberNumber of vertices in the data-set.
Returns
Returns 0 upon success, negative values otherwise.

Definition at line 149 of file ScalarFieldCriticalPoints.h.

Member Data Documentation

◆ BackEnd

BACKEND ttk::ScalarFieldCriticalPoints::BackEnd {BACKEND::PROGRESSIVE_TOPOLOGY}
protected

Definition at line 170 of file ScalarFieldCriticalPoints.h.

◆ criticalPoints_

std::vector<std::pair<SimplexId, char> >* ttk::ScalarFieldCriticalPoints::criticalPoints_ {}
protected

Definition at line 165 of file ScalarFieldCriticalPoints.h.

◆ dimension_

int ttk::ScalarFieldCriticalPoints::dimension_ {}
protected

Definition at line 161 of file ScalarFieldCriticalPoints.h.

◆ forceNonManifoldCheck

bool ttk::ScalarFieldCriticalPoints::forceNonManifoldCheck {false}
protected

Definition at line 167 of file ScalarFieldCriticalPoints.h.

◆ IsResumable

bool ttk::ScalarFieldCriticalPoints::IsResumable {false}
protected

Definition at line 174 of file ScalarFieldCriticalPoints.h.

◆ progT_

ProgressiveTopology ttk::ScalarFieldCriticalPoints::progT_ {}
protected

Definition at line 171 of file ScalarFieldCriticalPoints.h.

◆ StartingResolutionLevel

int ttk::ScalarFieldCriticalPoints::StartingResolutionLevel {0}
protected

Definition at line 172 of file ScalarFieldCriticalPoints.h.

◆ StoppingResolutionLevel

int ttk::ScalarFieldCriticalPoints::StoppingResolutionLevel {-1}
protected

Definition at line 173 of file ScalarFieldCriticalPoints.h.

◆ TimeLimit

double ttk::ScalarFieldCriticalPoints::TimeLimit {}
protected

Definition at line 175 of file ScalarFieldCriticalPoints.h.

◆ vertexLinkEdgeLists_

const std::vector<std::vector<std::pair<SimplexId, SimplexId> > >* ttk::ScalarFieldCriticalPoints::vertexLinkEdgeLists_ {}
protected

Definition at line 164 of file ScalarFieldCriticalPoints.h.

◆ vertexNumber_

SimplexId ttk::ScalarFieldCriticalPoints::vertexNumber_ {}
protected

Definition at line 162 of file ScalarFieldCriticalPoints.h.


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