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

TTK connectedComponents processing package. More...

#include <ConnectedComponents.h>

Inheritance diagram for ttk::ConnectedComponents:
ttk::Debug ttk::BaseClass ttkConnectedComponents

Classes

struct  Component
 

Public Member Functions

 ConnectedComponents ()
 
 ~ConnectedComponents () override=default
 
int preconditionTriangulation (ttk::AbstractTriangulation *triangulation) const
 
template<typename TT = ttk::AbstractTriangulation>
int computeFloodFill (int *labels, std::vector< Component > &components, const TT *triangulation, const TID seed) const
 
template<typename DT >
int initializeComponentIds (int *componentIds, const TID nVertices, const DT *featureMask=nullptr, const DT backgroundThreshold=0) const
 
template<typename TT = ttk::AbstractTriangulation>
int computeConnectedComponents (std::vector< Component > &components, int *componentIds, const TT *triangulation) const
 
template<typename F , typename DT >
int mapData (std::vector< Component > &components, const int *componentIds, const int nVertices, const F f, DT *out) const
 
- 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)
 

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)
 
- 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 connectedComponents processing package.

Author
Jonas Lukasczyk jl@jl.nosp@m.uk.d.nosp@m.e
Date
01.02.2019

This filter consumes a scalar field with a feature mask and computes for each edge connected group of vertices with a non-background mask value a so-called connected component via flood-filling, where the background is masked with values smaller-equal zero. The computed components store the size, seed, and center of mass of each component. The flag UseSeedIdAsComponentId controls if the resulting segmentation is either labeled by the index of the component, or by its seed location (which can be used as a deterministic component label).

Definition at line 26 of file ConnectedComponents.h.

Constructor & Destructor Documentation

◆ ConnectedComponents()

ttk::ConnectedComponents::ConnectedComponents ( )
inline

Definition at line 41 of file ConnectedComponents.h.

◆ ~ConnectedComponents()

ttk::ConnectedComponents::~ConnectedComponents ( )
overridedefault

Member Function Documentation

◆ computeConnectedComponents()

template<typename TT = ttk::AbstractTriangulation>
int ttk::ConnectedComponents::computeConnectedComponents ( std::vector< Component > &  components,
int *  componentIds,
const TT *  triangulation 
) const
inline

Definition at line 134 of file ConnectedComponents.h.

◆ computeFloodFill()

template<typename TT = ttk::AbstractTriangulation>
int ttk::ConnectedComponents::computeFloodFill ( int *  labels,
std::vector< Component > &  components,
const TT *  triangulation,
const TID  seed 
) const
inline

Definition at line 52 of file ConnectedComponents.h.

◆ initializeComponentIds()

template<typename DT >
int ttk::ConnectedComponents::initializeComponentIds ( int *  componentIds,
const TID  nVertices,
const DT *  featureMask = nullptr,
const DT  backgroundThreshold = 0 
) const
inline

Definition at line 109 of file ConnectedComponents.h.

◆ mapData()

template<typename F , typename DT >
int ttk::ConnectedComponents::mapData ( std::vector< Component > &  components,
const int *  componentIds,
const int  nVertices,
const F  f,
DT *  out 
) const
inline

Definition at line 155 of file ConnectedComponents.h.

◆ preconditionTriangulation()

int ttk::ConnectedComponents::preconditionTriangulation ( ttk::AbstractTriangulation triangulation) const
inline

Definition at line 46 of file ConnectedComponents.h.


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