TTK
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ttk::ftm::FTMTree Class Reference

TTK processing package that efficiently computes the contour tree of scalar data and more (data segmentation, topological simplification, persistence diagrams, persistence curves, etc.). More...

#include <FTMTree.h>

Inheritance diagram for ttk::ftm::FTMTree:
ttk::ftm::FTMTree_CT ttk::ftm::FTMTree_MT ttk::Debug ttk::BaseClass ttk::ftm::FTMTreePP

Public Member Functions

 FTMTree ()
 
 ~FTMTree () override=default
 
template<typename scalarType , class triangulationType >
void build (const triangulationType *mesh)
 
- Public Member Functions inherited from ttk::ftm::FTMTree_CT
 FTMTree_CT (const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars)
 
 ~FTMTree_CT () override=default
 
FTMTree_MTgetJoinTree ()
 
FTMTree_MTgetSplitTree ()
 
FTMTree_MTgetTree (const TreeType tt)
 
void preconditionTriangulation (AbstractTriangulation *tri, const bool preproc=true)
 
int setDebugLevel (const int &d) override
 
int setThreadNumber (const int n) override
 
template<class triangulationType >
int leafSearch (const triangulationType *mesh)
 
template<class triangulationType >
void build (const triangulationType *mesh, TreeType tt)
 
void insertNodes ()
 
int combine ()
 
void updateRegion (const ArcRegion &arcRegion, idSuperArc ctArc)
 
void createCTArcSegmentation (idSuperArc ctArc, const bool isJT, idSuperArc xtArc)
 
void finalizeSegmentation ()
 
- Public Member Functions inherited from ttk::ftm::FTMTree_MT
 FTMTree_MT (const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars, TreeType type)
 
 ~FTMTree_MT () override
 
void clear ()
 
void setParamsScalars (const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars)
 
template<class triangulationType >
void initNbScalars (const triangulationType *triangulation)
 
void initComp ()
 
bool compLower (const SimplexId a, const SimplexId b)
 
template<typename scalarType >
void sortInput ()
 if sortedVertices_ is null, define and fill it
 
void makeAlloc ()
 clear local data for new computation
 
void makeInit ()
 
void initVectStates (const SimplexId nbLeaves)
 
template<class triangulationType >
void build (const triangulationType *mesh, const bool ct)
 Compute the merge.
 
template<class triangulationType >
int leafSearch (const triangulationType *mesh)
 
template<class triangulationType >
void leafGrowth (const triangulationType *mesh)
 
template<class triangulationType >
void arcGrowth (const triangulationType *mesh, const SimplexId startVert, const SimplexId orig)
 
template<class triangulationType >
std::tuple< bool, bool > propagate (const triangulationType *mesh, CurrentState &currentState, UF curUF)
 
template<class triangulationType >
void closeAndMergeOnSaddle (const triangulationType *mesh, SimplexId saddleVert)
 
template<class triangulationType >
void closeOnBackBone (const triangulationType *mesh, SimplexId saddleVert)
 
void closeArcsUF (idNode closeNode, UF uf)
 
template<class triangulationType >
SimplexId trunk (const triangulationType *mesh, const bool ct)
 
virtual SimplexId trunkSegmentation (const std::vector< SimplexId > &pendingNodesVerts, const SimplexId begin, const SimplexId stop)
 
SimplexId trunkCTSegmentation (const std::vector< SimplexId > &pendingNodesVerts, const SimplexId begin, const SimplexId stop)
 
void buildSegmentation ()
 use vert2tree to compute the segmentation of the fresh built merge tree.
 
void finalizeSegmentation ()
 
void normalizeIds ()
 
SimplexId getArcSize (const idSuperArc arcId)
 
bool isJT () const
 
bool isST () const
 
void preconditionTriangulation (AbstractTriangulation *tri, const bool preproc=true)
 
void setScalars (void *local_scalars)
 
void setTreeType (const int local_treeType)
 
void setSegmentation (const bool segm)
 
void setNormalizeIds (const bool normalize)
 
template<typename scalarType >
const scalarType & getValue (SimplexId nodeId) const
 
template<typename scalarType >
void setVertexScalars (const scalarType *vals)
 
void setVertexSoSoffsets (const SimplexId *const sos)
 
idSuperArc getNumberOfSuperArcs () const
 
SuperArcgetSuperArc (idSuperArc i)
 
const SuperArcgetSuperArc (idSuperArc i) const
 
idNode getNumberOfNodes () const
 
NodegetNode (idNode nodeId)
 
void setValence (const SimplexId v, const SimplexId val)
 
idNode getNumberOfLeaves () const
 
const std::vector< idNode > & getLeaves () const
 
idNode getLeave (const idNode id) const
 
const std::vector< idNode > & getRoots () const
 
SimplexId getNumberOfVertices () const
 
void setVert2Tree (decltype(mt_data_.vert2tree) const &vect2tree)
 
bool isCorrespondingArc (const SimplexId val) const
 
bool isCorrespondingNode (const SimplexId val) const
 
bool isCorrespondingNull (const SimplexId val) const
 
idNode getCorrespondingNodeId (const SimplexId val) const
 
idSuperArc getCorrespondingSuperArcId (const SimplexId val) const
 
SuperArcvertex2SuperArc (const SimplexId vert)
 
Nodevertex2Node (const SimplexId vert)
 
void updateCorrespondingArc (const SimplexId vert, const idSuperArc arc)
 
void updateCorrespondingNode (const SimplexId vert, const idNode node)
 
idCorresp idNode2corr (const idNode id) const
 
idNode corr2idNode (const idCorresp &corr) const
 
idSuperArc openSuperArc (idNode downNodeId)
 
idSuperArc makeSuperArc (idNode downNodeId, idNode upNodeId)
 
void closeSuperArc (idSuperArc superArcId, idNode upNodeId)
 
std::vector< idNodesortedNodes (const bool parallel=false)
 
void sortLeaves (const bool parallel=false)
 
void sortNodes ()
 Sort tree nodes according to vertex order.
 
void sortArcs ()
 Sort tree arcs.
 
idNode makeNode (SimplexId vertexId, SimplexId linked=nullVertex)
 
idNode makeNode (const Node *const n, SimplexId linked=nullVertex)
 
idSuperArc insertNode (Node *node, const bool segm=true)
 
NodegetDownNode (const SuperArc *a)
 
NodegetUpNode (const SuperArc *a)
 
idNode getDownNodeId (const SuperArc *a)
 
idNode getUpNodeId (const SuperArc *a)
 
NodegetLowerNode (const SuperArc *a)
 
NodegetUpperNode (const SuperArc *a)
 
idNode getLowerNodeId (const SuperArc *a)
 
idNode getUpperNodeId (const SuperArc *a)
 
idNode getParent (const idNode n)
 
void delNode (idNode node)
 
std::shared_ptr< FTMTree_MTclone () const
 
void move (FTMTree_MT &mt)
 
std::string printArc (idSuperArc a)
 
std::string printNode (idNode n)
 
void printTree2 ()
 
void printParams () const
 
int printTime (Timer &t, const std::string &s, const int debugLevel=2) const
 
bool isNodeOriginDefined (idNode nodeId)
 
bool isRoot (idNode nodeId)
 
bool isLeaf (idNode nodeId)
 
bool isNodeAlone (idNode nodeId)
 
bool isFullMerge ()
 
bool isBranchOrigin (idNode nodeId)
 
template<class dataType >
bool isJoinTree ()
 
template<class dataType >
bool isImportantPair (idNode nodeId, double threshold, std::vector< double > &excludeLower, std::vector< double > &excludeHigher)
 
template<class dataType >
bool isImportantPair (idNode nodeId, double threshold)
 
bool isNodeMerged (idNode nodeId)
 
bool isNodeIdInconsistent (idNode nodeId)
 
bool isThereOnlyOnePersistencePair ()
 
bool notNeedToNormalize (idNode nodeId)
 
bool isMultiPersPair (idNode nodeId)
 
template<class dataType >
bool isParentInconsistent (ftm::idNode nodeId)
 
template<class dataType >
bool verifyBranchDecompositionInconsistency ()
 
idNode getRoot ()
 
idNode getParentSafe (idNode nodeId)
 
void getChildren (idNode nodeId, std::vector< idNode > &res)
 
void getLeavesFromTree (std::vector< idNode > &res)
 
int getNumberOfLeavesFromTree ()
 
int getNumberOfNodeAlone ()
 
int getRealNumberOfNodes ()
 
template<class dataType >
idNode getMergedRootOrigin ()
 
void getBranchOriginsFromThisBranch (idNode node, std::tuple< std::vector< idNode >, std::vector< idNode > > &res)
 
void getTreeBranching (std::vector< idNode > &branching, std::vector< int > &branchingID, std::vector< std::vector< idNode > > &nodeBranching)
 
void getTreeBranching (std::vector< idNode > &branching, std::vector< int > &branchingID)
 
void getAllRoots (std::vector< idNode > &res)
 
int getNumberOfRoot ()
 
int getNumberOfChildren (idNode nodeId)
 
int getTreeDepth ()
 
int getNodeLevel (idNode nodeId)
 
void getAllNodeLevel (std::vector< int > &res)
 
void getLevelToNode (std::vector< std::vector< idNode > > &res)
 
void getBranchSubtree (std::vector< idNode > &branching, idNode branchRoot, std::vector< idNode > &res)
 
template<class dataType >
idNode getLowestNode (idNode nodeStart)
 
template<class dataType >
std::tuple< dataType, dataType > getBirthDeathFromIds (idNode nodeId1, idNode nodeId2)
 
template<class dataType >
std::tuple< dataType, dataType > getBirthDeathNodeFromIds (idNode nodeId1, idNode nodeId2)
 
template<class dataType >
std::tuple< dataType, dataType > getBirthDeath (idNode nodeId)
 
template<class dataType >
std::tuple< ftm::idNode, ftm::idNodegetBirthDeathNode (idNode nodeId)
 
template<class dataType >
std::tuple< dataType, dataType > getMergedRootBirthDeath ()
 
template<class dataType >
std::tuple< ftm::idNode, ftm::idNodegetMergedRootBirthDeathNode ()
 
template<class dataType >
dataType getBirth (idNode nodeId)
 
template<class dataType >
dataType getNodePersistence (idNode nodeId)
 
template<class dataType >
dataType getMaximumPersistence ()
 
template<class dataType >
ftm::idNode getSecondMaximumPersistenceNode ()
 
template<class dataType >
dataType getSecondMaximumPersistence ()
 
template<class dataType >
void getPersistencePairsFromTree (std::vector< std::tuple< ftm::idNode, ftm::idNode, dataType > > &pairs, bool useBD)
 
template<class dataType >
std::vector< ftm::idNodegetMultiPersOrigins (bool useBD)
 
void getMultiPersOriginsVectorFromTree (std::vector< std::vector< idNode > > &res)
 
void setParent (idNode nodeId, idNode newParentNodeId)
 
void deleteNode (idNode nodeId)
 
void deleteIthUpArc (idNode nodeId, int arcIth)
 
void deleteParent (idNode nodeId)
 
void deleteSubtree (idNode nodeId)
 
void copyMergeTreeStructure (FTMTree_MT *tree)
 
void printNodeSS (idNode node, std::stringstream &ss)
 
template<class dataType >
std::stringstream printNode2 (idNode nodeId, bool doPrint=true)
 
template<class dataType >
std::stringstream printMergedRoot (bool doPrint=true)
 
std::stringstream printTree (bool doPrint=true)
 
std::stringstream printTreeStats (bool doPrint=true)
 
template<class dataType >
std::stringstream printTreeScalars (bool printNodeAlone=true, bool doPrint=true)
 
template<class dataType >
std::stringstream printPairsFromTree (bool useBD=false, bool printPairs=true, bool doPrint=true)
 
std::stringstream printMultiPersOriginsVectorFromTree (bool doPrint=true)
 
template<class dataType >
std::stringstream printMultiPersPairsFromTree (bool useBD=false, bool printPairs=true, bool doPrint=true)
 
template<class dataType >
void getPersistencePairsFromTree (std::vector< std::tuple< idNode, idNode, dataType > > &pairs, bool useBD)
 
template<class dataType >
std::vector< idNodegetMultiPersOrigins (bool useBD)
 
- 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)
 
virtual int setWrapper (const Wrapper *wrapper)
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::ftm::FTMTree_MT
idNode getVertInRange (const std::vector< SimplexId > &range, const SimplexId v, const idNode last=0) const
 
std::tuple< SimplexId, SimplexIdgetBoundsFromVerts (const std::vector< SimplexId > &nodes) const
 
idSuperArc upArcFromVert (const SimplexId v)
 
SimplexId getChunkSize (const SimplexId nbVerts=-1, const SimplexId nbtasks=100) const
 
SimplexId getChunkCount (const SimplexId nbVerts=-1, const SimplexId nbTasks=100) const
 
void sortUpArcs (const idNode nid)
 
void sortDownArcs (const idNode nid)
 
bool isLower (SimplexId a, SimplexId b) const
 
bool isHigher (SimplexId a, SimplexId b) const
 
template<typename type >
void createVector (std::vector< type > &vec)
 
template<typename type >
void createAtomicVector (std::shared_ptr< FTMAtomicVector< type > > &ptr)
 
template<typename type >
void initVector (std::vector< type > &vect, const type val)
 
- 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)
 
- Protected Attributes inherited from ttk::ftm::FTMTree_CT
FTMTree_MT jt_
 
FTMTree_MT st_
 
- Protected Attributes inherited from ttk::ftm::FTMTree_MT
std::shared_ptr< Paramsparams_
 
std::shared_ptr< Scalarsscalars_
 
TreeData mt_data_
 
Comparison comp_
 
- 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_
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

TTK processing package that efficiently computes the contour tree of scalar data and more (data segmentation, topological simplification, persistence diagrams, persistence curves, etc.).

Compute the join tree, split tree or contour tree of a function on a triangulation. TTK assumes that the input dataset is made of only one connected component.

Author
Charles Gueunet charl.nosp@m.es.g.nosp@m.ueune.nosp@m.t@li.nosp@m.p6.fr
Date
December 2016.
Parameters
dataTypeData type of the input scalar field (char, float, etc.).
See also
ttkFTMTree.cpp for a usage example.

Online examples:

Definition at line 53 of file FTMTree.h.

Constructor & Destructor Documentation

◆ FTMTree()

FTMTree::FTMTree ( )

Definition at line 20 of file FTMTree.cpp.

◆ ~FTMTree()

ttk::ftm::FTMTree::~FTMTree ( )
overridedefault

Member Function Documentation

◆ build()

template<typename scalarType , class triangulationType >
void ttk::ftm::FTMTree::build ( const triangulationType *  mesh)

Definition at line 30 of file FTMTree_Template.h.


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