TTK
|
Contour Tree Data Structure for an unrooted contour tree of unbounded degree for internal use from the ttk:ContourTreeAlignment module. More...
#include <CTA_contourtree.h>
Public Member Functions | |
ContourTree (float *scalars, int *regionSizes, int *segmentationIds, long long *topology, size_t nVertices, size_t nEdges, std::vector< std::vector< int > > regions={}) | |
~ContourTree () | |
Destructor of internal contour tree class. | |
std::shared_ptr< BinaryTree > | rootAtMax () |
std::shared_ptr< BinaryTree > | rootAtNode (const std::shared_ptr< CTNode > &root) |
bool | isBinary () |
void | computeBranches () |
std::pair< std::vector< std::shared_ptr< CTNode > >, std::vector< std::shared_ptr< CTEdge > > > | getGraph () |
Contour Tree Data Structure for an unrooted contour tree of unbounded degree for internal use from the ttk:ContourTreeAlignment module.
ToDo
Definition at line 196 of file CTA_contourtree.h.
ContourTree::ContourTree | ( | float * | scalars, |
int * | regionSizes, | ||
int * | segmentationIds, | ||
long long * | topology, | ||
size_t | nVertices, | ||
size_t | nEdges, | ||
std::vector< std::vector< int > > | regions = {} |
||
) |
Constructor for internal contour tree class. Constructs graph from vtk style array input.
scalars | Scalar values of the contour tree nodes. scalars[i] is scalar values of the node of index i. |
regionSizes | Region size values of the contour tree edges. regionSizes[i] is the number of vertices in the segment associated with the edge of index i. |
segmentationIds | Segmentation ids of the contour tree edges. segmentationIds[i] is an identifier of the segment associated with the edge of index i. |
topology | Connectivity information describing the graph structure. topology[i][0] and topology[i][1] are the indices of the two nodes incident to the edge of index i. |
nVertices | The number of vertices in the graph and the length of scalar array. |
nEdges | The number of edges in the graph and the length of regionSizes, segmentationIds and topology arrays. |
regions | Segments/Regions associated with the edges of the contour tree. regions[i] is a vector of vertex identifiers that belong to the edge of index i. |
Definition at line 8 of file CTA_contourtree.cpp.
|
default |
Destructor of internal contour tree class.
void ContourTree::computeBranches | ( | ) |
Computes a branch decomposition of the contour tree and attaches the branch information to the node objects.
Definition at line 259 of file CTA_contourtree.cpp.
std::pair< std::vector< std::shared_ptr< ttk::cta::CTNode > >, std::vector< std::shared_ptr< ttk::cta::CTEdge > > > ContourTree::getGraph | ( | ) |
Returns a graph representation of the contour tree as node list and edge list.
Definition at line 394 of file CTA_contourtree.cpp.
bool ContourTree::isBinary | ( | ) |
Checks if the maximum node degree is at most 3.
Definition at line 255 of file CTA_contourtree.cpp.
std::shared_ptr< ttk::cta::BinaryTree > ContourTree::rootAtMax | ( | ) |
Get a rooted binary representation of the contour tree. The root is the vertex of highest scalar value.
Definition at line 228 of file CTA_contourtree.cpp.
std::shared_ptr< ttk::cta::BinaryTree > ContourTree::rootAtNode | ( | const std::shared_ptr< CTNode > & | root | ) |
Get a rooted binary representation of the contour tree. The root is the vertex passed as first argument.
root | The contour tree node that will be the root of the rooted tree. |
Definition at line 247 of file CTA_contourtree.cpp.