|
mmcfilters
Public API documentation
|
Mutable connected-subset tree on a finite pixel domain. More...
#include <MorphologicalTree.hpp>
Classes | |
| class | AliveNodeIterator |
| Iterator over live node ids in the dense internal-node domain. More... | |
| class | AliveNodeRange |
| Range wrapper for iterating over live node ids. More... | |
| class | AncestorNodeIterator |
| Iterator that walks from a node towards the root. More... | |
| class | AncestorNodeRange |
| Range wrapper for rootward path traversal. More... | |
| class | BreadthFirstNodeIterator |
| Breadth-first iterator over one subtree. More... | |
| class | BreadthFirstNodeRange |
| Range wrapper for breadth-first subtree traversal. More... | |
| class | ChildrenIterator |
| Iterator over the direct children of one node. More... | |
| class | ChildrenRange |
| Range wrapper for direct-child iteration. More... | |
| class | DescendantNodeRange |
| Range wrapper over the proper descendants of one node. More... | |
| class | NodeSupportIterator |
| Iterator over all pixels in one node support. More... | |
| class | NodeSupportRange |
| Range wrapper for node-support pixel iteration. More... | |
| class | PathBetweenNodesIterator |
| Iterator over a materialised path between two nodes. More... | |
| class | PathBetweenNodesRange |
| Range wrapper for the path connecting two nodes in the same component. More... | |
| class | PostOrderNodeIterator |
| Post-order iterator over one subtree. More... | |
| class | PostOrderNodeRange |
| Range wrapper for post-order subtree traversal. More... | |
| class | ProperPartIterator |
| Iterator over the pixels in one node's proper part. More... | |
| class | ProperPartRange |
| Range wrapper for direct proper-part iteration. More... | |
| class | SubtreeNodeIterator |
| Depth-first iterator over a subtree in pre-order. More... | |
| class | SubtreeNodeRange |
| Range wrapper for pre-order subtree traversal. More... | |
Public Member Functions | |
| MorphologicalTree (const MorphologicalTree &)=delete | |
| Copying is disabled to keep topology storage explicit. | |
| MorphologicalTree & | operator= (const MorphologicalTree &)=delete |
| Copy assignment is disabled to keep topology storage explicit. | |
| MorphologicalTree (MorphologicalTree &&other) | |
| Moves a complete committed topology. | |
| MorphologicalTree & | operator= (MorphologicalTree &&other) |
| Move-assigns a complete committed topology. | |
| virtual | ~MorphologicalTree ()=default |
| Destroys the topology storage and cached traversal state. | |
| MorphologicalTree (detail::MorphologicalTreeConstructionTag, std::span< const NodeId > nodeParent, std::span< const NodeId > smallestNodeMap, NodeId root, int rows, int columns, MorphologicalTreeSemantics semantics) | |
| Tag-protected import from native mmcfilters topology buffers. | |
| MorphologicalTree (detail::MorphologicalTreeConstructionTag, std::span< const NodeId > nodeParent, std::span< const NodeId > smallestNodeMap, NodeId root, MorphologicalTreeSemantics semantics) | |
| Imports a native hierarchy over an abstract finite pixel set. | |
| MorphologicalTree | clone () const |
| Creates an independent copy of the structural tree state. | |
| std::size_t | getMutationVersion () const noexcept |
| Returns the monotonic mutation counter used by read-only views. | |
| void | requireMutationVersion (std::size_t expectedVersion, const char *context) const |
| Rejects stale read-only views that captured an older mutation version. | |
| int | numInternalNodeSlots () const |
| Returns the size of the dense internal-node id domain. | |
| int | numPixels () const |
| Returns the cardinality of the pixel domain. | |
| int | getNumHigraNodes () const |
| Returns the size of the preserved imported Higra node-id domain. | |
| int | getNodeIdSpaceSize (NodeIdSpace outputSpace) const |
| Returns the size of the requested node-id domain. | |
| NodeId | getHigraNodeId (NodeId nodeId) const noexcept |
| Returns the preserved imported Higra node id for one live tree node. | |
| NodeId | root () const |
| Returns the current hierarchy root. | |
| bool | isNode (NodeId nodeId) const noexcept |
Tests whether nodeId belongs to the internal-node id domain. | |
| bool | isPixel (PixelId pixel) const noexcept |
Tests whether pixel belongs to the pixel domain. | |
| bool | isAlive (NodeId nodeId) const |
| Tests whether a node slot currently represents a live node. | |
| bool | isRoot (NodeId nodeId) const |
Tests whether nodeId is the current root. | |
| int | getNumFreeNodeSlots () const |
| Returns the number of currently reusable node slots. | |
| int | numLeafNodes () const |
| Counts the live nodes that currently have no children. | |
| int | numChildren (NodeId nodeId) const |
Returns the number of direct children of nodeId. | |
| int | numDescendants (NodeId nodeId) const |
Returns the number of internal descendants of nodeId. | |
| int | numSiblings (NodeId nodeId) const |
Returns the number of siblings of nodeId. | |
| int | dfsEntryIndex (NodeId nodeId) const |
Returns the zero-based DFS entry-event index of nodeId. | |
| int | dfsExitIndex (NodeId nodeId) const |
Returns the zero-based DFS exit-event index of nodeId. | |
| NodeId | getFirstChild (NodeId nodeId) const |
Returns the first direct child of nodeId, or InvalidNode. | |
| NodeId | getNextSibling (NodeId nodeId) const |
Returns the next sibling of nodeId, or InvalidNode. | |
| bool | isLeaf (NodeId nodeId) const |
Tests whether nodeId has no direct children. | |
| int | properPartCardinality (NodeId nodeId) const |
Returns the cardinality of the proper part of nodeId. | |
| bool | hasEmptyProperPart (NodeId nodeId) const |
Tests whether nodeId has an empty proper part. | |
| bool | hasChild (NodeId parentNodeId, NodeId childId) const |
Tests whether childId is a direct child of parentNodeId. | |
| NodeId | parent (NodeId nodeId) const |
Returns the direct parent of nodeId. | |
| NodeId | smallestNode (PixelId pixel) const |
Returns the smallest node containing pixel. | |
| std::span< const NodeId > | smallestNodeMap () const noexcept |
| Returns the pixel-indexed smallest-node map. | |
| std::vector< NodeId > | leaves () const |
| Returns all live leaf nodes in the current hierarchy. | |
| MorphologicalTreeKind | kind () const noexcept |
| Returns the optional descriptive hierarchy-family label. | |
| const MorphologicalTreeSemantics & | semantics () const noexcept |
| Returns all generic semantic capabilities of this hierarchy. | |
| NodeAltitudeOrder | nodeAltitudeOrder () const noexcept |
| Returns the global parent-to-child altitude ordering constraint. | |
| const MorphologicalTreeConstructionContext & | constructionContext () const noexcept |
| Returns the typed construction context retained by this tree. | |
| const SharedAdjacencyContext * | sharedAdjacencyContext () const noexcept |
Returns the shared-adjacency context, or nullptr. | |
| const RegularGridAdjacency2D * | constructionAdjacency () const noexcept |
| Returns the adjacency retained by a shared construction context. | |
| const TopographicConvention * | topographicConvention () const noexcept |
Returns the topographic convention, or nullptr. | |
| const ComplementaryAdjacencies * | complementaryAdjacencies () const noexcept |
| Returns the complementary adjacencies explicitly retained by a topographic immersion. | |
| int | numNodes () const noexcept |
| Returns the number of currently live nodes. | |
| bool | isEditing () const noexcept |
| Tests whether a staged edit session is currently open. | |
| const TreeEditValidationStatistics & | getEditValidationStatistics () const noexcept |
| Returns validation-path counters for committed edit sessions. | |
| void | requireNotEditing (const char *context) const |
| Rejects operations that require a committed connected topology. | |
| bool | hasDetachedAliveNodes () const noexcept |
| Returns whether the tree currently contains alive detached nodes. | |
| bool | hasGridDomain2D () const noexcept |
| Tests whether pixel ids have an attached row/column layout. | |
| const std::optional< GridDomain2D > & | gridDomain2D () const noexcept |
| Returns the optional regular 2D pixel domain. | |
| const GridDomain2D & | requireGridDomain2D (const char *context) const |
| Returns the regular 2D domain or rejects a geometry-dependent call. | |
| int | numRows () const |
| Returns the number of rows in the regular 2D pixel domain. | |
| int | numColumns () const |
| Returns the number of columns in the regular 2D pixel domain. | |
| void | validateConnectedRootedTree () const |
| Validates one rooted tree with a complete smallest-node map and non-empty supports. | |
| TreeValidationResult | validateConnectedRootedTreeResult () const noexcept |
| Runs strong validation and returns the result instead of throwing. | |
| bool | isTreeOfPartialPartitions () const |
| Tests whether every live node has a non-empty proper part. | |
| void | validateTreeOfPartialPartitions () const |
| Validates the connected-subset invariants and the non-empty proper-part specialization. | |
| bool | isAncestor (NodeId u, NodeId v) const |
Tests whether u is an ancestor of v. | |
| bool | isDescendant (NodeId u, NodeId v) const |
Tests whether u is a descendant of v. | |
| bool | isComparable (NodeId u, NodeId v) const |
Tests whether u and v are comparable in the ancestry order. | |
| bool | isStrictAncestor (NodeId u, NodeId v) const |
Tests whether u is a strict ancestor of v. | |
| bool | isStrictDescendant (NodeId u, NodeId v) const |
Tests whether u is a strict descendant of v. | |
| bool | isStrictComparable (NodeId u, NodeId v) const |
Tests whether u and v are strictly comparable in the ancestry order. | |
| NodeId | lowestCommonAncestor (NodeId u, NodeId v) const |
Returns the lowest common ancestor of u and v. | |
| std::vector< NodeId > | lowestCommonAncestors (std::span< const std::pair< NodeId, NodeId > > queries) const |
| Returns lowest common ancestors for a batch of node pairs. | |
| AliveNodeRange | aliveNodeIds () const |
| Returns a fail-fast range over all live node ids. | |
| ChildrenRange | children (NodeId nodeId) const |
Returns a fail-fast range over the direct children of nodeId. | |
| ProperPartRange | properPart (NodeId nodeId) const |
Returns a fail-fast range over the pixels in the proper part of nodeId. | |
| NodeSupportRange | nodeSupport (NodeId nodeId) const |
Returns a fail-fast range over the pixels in the support of nodeId. | |
| PostOrderNodeRange | postOrder () const |
| Returns a post-order traversal range rooted at the connected root. | |
| PostOrderNodeRange | postOrder (NodeId rootNodeId) const |
Returns a post-order traversal range rooted at rootNodeId. | |
| BreadthFirstNodeRange | breadthFirstTraversal () const |
| Returns a breadth-first traversal range rooted at the connected root. | |
| BreadthFirstNodeRange | breadthFirstTraversal (NodeId rootNodeId) const |
Returns a breadth-first traversal range rooted at rootNodeId. | |
| AncestorNodeRange | ancestors (NodeId nodeId) const |
Returns nodeId and its proper ancestors through the connected root. | |
| PathBetweenNodesRange | getPathBetweenNodes (NodeId sourceNodeId, NodeId targetNodeId) const |
Returns the path that connects sourceNodeId and targetNodeId. | |
| SubtreeNodeRange | subtreeNodes (NodeId nodeId) const |
Returns a pre-order traversal range over the subtree of nodeId. | |
| DescendantNodeRange | descendants (NodeId nodeId) const |
Returns a range over all proper descendants of nodeId. | |
| TreeEditor | edit () |
| Opens the only public entrypoint for staged structural mutations. | |
| void | pruneNode (NodeId nodeId) |
Prunes the subtree of nodeId, moving all its support to the parent. | |
| void | mergeNodeIntoParent (NodeId nodeId) |
Merges nodeId into its parent and releases the emptied slot. | |
Friends | |
| class | TreeEditor |
| class | MorphologicalTreeFactory |
| class | detail::TreeKernelAccess |
| template<AltitudeValue T> | |
| ValuedMorphologicalTree< T > | detail::materializeNativeHierarchy (NativeHierarchyOwned< T > &&hierarchy, std::optional< NodeId > preservedExternalNodeIdOffset, detail::MaterializedVersionPolicy versionPolicy) |
| Allows the native hierarchy materializer to initialize owned topology buffers and construction metadata. | |
Mutable connected-subset tree on a finite pixel domain.
MorphologicalTree is the central mutable hierarchy of this project. It can represent any rooted connected-subset tree model supported by the project. A morphological tree of partial partitions is the stricter case in which every node has a non-empty proper part. The class exposes a dense NodeId domain together with the smallest-node map, explicit parent/child links, linked pixel lists for the nodes' proper parts, optional regular 2D pixel metadata, and a small set of structural caches used by the public traversal and ancestry queries.
Data model:
[0, numPixels());NodeId in the range [0, numInternalNodeSlots());properPart(node) contains the pixels whose smallest node is node and may be empty;nodeSupport(node) is the union of the proper parts in the node's subtree;Main responsibilities:
ValuedMorphologicalTree<std::uint8_t>.The class intentionally keeps only the canonical structural state and a small number of derived caches. Higher-level attribute computation is delegated to the incremental attribute computers in mmcfilters/attributes.
Definition at line 117 of file MorphologicalTree.hpp.
|
inline |
Moves a complete committed topology.
Moving an owner with an active editor would leave that editor pointing at the moved-from object, so active edit sessions are rejected.
| other | Object to compare with or transfer from. |
Definition at line 1646 of file MorphologicalTree.hpp.
|
inline |
Tag-protected import from native mmcfilters topology buffers.
This path is used by builders that already materialize internal-node parent links and a row-major smallest-node map. Nodes are not required to have a non-empty proper part, so the representation supports the general connected-subset tree model. The buffers are copied into canonical tree storage and validated as one connected rooted hierarchy in which every node has non-empty subtree support.
| nodeParent | Parent-node value. |
| smallestNodeMap | Pixel-indexed smallest node map. |
| root | Root node of the traversal. |
| rows | Number of rows in the domain. |
| columns | Number of columns in the domain. |
| semantics | Hierarchy semantics validated by the operation. |
Definition at line 1700 of file MorphologicalTree.hpp.
|
inline |
Imports a native hierarchy over an abstract finite pixel set.
No row/column interpretation is attached. Regular-grid reconstruction and geometry-dependent algorithms consequently reject this tree explicitly, while purely topological and support-based algorithms remain available.
| nodeParent | Parent-node value. |
| smallestNodeMap | Pixel-indexed smallest node map. |
| root | Root node of the traversal. |
| semantics | Hierarchy semantics validated by the operation. |
Definition at line 1718 of file MorphologicalTree.hpp.
|
inline |
Returns a fail-fast range over all live node ids.
Definition at line 2683 of file MorphologicalTree.hpp.
|
inline |
Returns nodeId and its proper ancestors through the connected root.
The queried node is the first element, so this range is inclusive of self. The connected root is the last element.
| nodeId | Dense internal node identifier. |
Definition at line 2766 of file MorphologicalTree.hpp.
|
inline |
Returns a breadth-first traversal range rooted at the connected root.
Definition at line 2744 of file MorphologicalTree.hpp.
|
inline |
Returns a breadth-first traversal range rooted at rootNodeId.
| rootNodeId | Identifier of the traversal root. |
Definition at line 2752 of file MorphologicalTree.hpp.
|
inline |
Returns a fail-fast range over the direct children of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 2691 of file MorphologicalTree.hpp.
|
inline |
Creates an independent copy of the structural tree state.
The public copy constructor stays deleted so ownership remains explicit at API boundaries. This method is used by wrappers that need to preserve a caller-owned topology while creating a new tree-backed object. A staged edit cannot be cloned because its topology may be a temporary forest and has not crossed the commit validation boundary.
Definition at line 1734 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the complementary adjacencies explicitly retained by a topographic immersion.
nullptr when no complementary grid immersion is stored. Definition at line 2194 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the adjacency retained by a shared construction context.
nullptr when no shared-adjacency context is stored. Definition at line 2178 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the typed construction context retained by this tree.
Definition at line 2167 of file MorphologicalTree.hpp.
|
inline |
Returns a range over all proper descendants of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 2801 of file MorphologicalTree.hpp.
Returns the zero-based DFS entry-event index of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 1989 of file MorphologicalTree.hpp.
Returns the zero-based DFS exit-event index of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 2001 of file MorphologicalTree.hpp.
|
inline |
Opens the only public entrypoint for staged structural mutations.
Use this for multi-step topology rewiring that may temporarily detach nodes, move children/proper parts, or create intermediate nodes. TreeEditor::commit() runs the strong connected-rooted-tree validation.
Defined in TreeEditor.hpp after TreeEditor is complete; at this point only the forward declaration is available.
Definition at line 1306 of file TreeEditor.hpp.
|
inlinenoexcept |
Returns validation-path counters for committed edit sessions.
Definition at line 2222 of file MorphologicalTree.hpp.
Returns the first direct child of nodeId, or InvalidNode.
| nodeId | Dense internal node identifier. |
Definition at line 2013 of file MorphologicalTree.hpp.
Returns the preserved imported Higra node id for one live tree node.
Returns InvalidNode when the original Higra node-id space is not preserved.
| nodeId | Dense internal node identifier. |
Definition at line 1870 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the monotonic mutation counter used by read-only views.
Definition at line 1797 of file MorphologicalTree.hpp.
Returns the next sibling of nodeId, or InvalidNode.
| nodeId | Dense internal node identifier. |
Definition at line 2024 of file MorphologicalTree.hpp.
|
inline |
Returns the size of the requested node-id domain.
NodeIdSpace::Higra means the preserved imported Higra domain, not the compact domain that would be generated by exporting the current tree.
| outputSpace | Node-id domain used to index the output. |
Definition at line 1851 of file MorphologicalTree.hpp.
|
inline |
Returns the number of currently reusable node slots.
Definition at line 1928 of file MorphologicalTree.hpp.
|
inline |
Returns the size of the preserved imported Higra node-id domain.
| std::runtime_error | if the tree was not imported from Higra or if the preserved Higra node-id space was invalidated by an edit. |
Definition at line 1835 of file MorphologicalTree.hpp.
|
inline |
Returns the path that connects sourceNodeId and targetNodeId.
| sourceNodeId | Node identifier. |
| targetNodeId | Node identifier. |
Definition at line 2778 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the optional regular 2D pixel domain.
Definition at line 2274 of file MorphologicalTree.hpp.
Tests whether childId is a direct child of parentNodeId.
| parentNodeId | Identifier of the parent node. |
| childId | Identifier of the child node. |
Definition at line 2063 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns whether the tree currently contains alive detached nodes.
Detached alive nodes are self-parented nodes other than the connected root. They are allowed during explicit edit sessions but make the hierarchy a forest rather than a single rooted tree.
Definition at line 2243 of file MorphologicalTree.hpp.
Tests whether nodeId has an empty proper part.
| nodeId | Dense internal node identifier. |
Definition at line 2054 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Tests whether pixel ids have an attached row/column layout.
Definition at line 2267 of file MorphologicalTree.hpp.
Tests whether a node slot currently represents a live node.
| nodeId | Dense internal node identifier. |
Definition at line 1906 of file MorphologicalTree.hpp.
Tests whether u is an ancestor of v.
| u | First endpoint or element. |
| v | Second endpoint or element. |
Definition at line 2561 of file MorphologicalTree.hpp.
Tests whether u and v are comparable in the ancestry order.
| u | First endpoint or element. |
| v | Second endpoint or element. |
Definition at line 2594 of file MorphologicalTree.hpp.
Tests whether u is a descendant of v.
| u | First endpoint or element. |
| v | Second endpoint or element. |
Definition at line 2578 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Tests whether a staged edit session is currently open.
Definition at line 2215 of file MorphologicalTree.hpp.
Tests whether nodeId has no direct children.
| nodeId | Dense internal node identifier. |
Definition at line 2035 of file MorphologicalTree.hpp.
Tests whether nodeId belongs to the internal-node id domain.
| nodeId | Dense internal node identifier. |
Definition at line 1890 of file MorphologicalTree.hpp.
Tests whether pixel belongs to the pixel domain.
| pixel | Pixel identifier. |
Definition at line 1898 of file MorphologicalTree.hpp.
Tests whether nodeId is the current root.
| nodeId | Dense internal node identifier. |
Definition at line 1921 of file MorphologicalTree.hpp.
Tests whether u is a strict ancestor of v.
| u | First endpoint or element. |
| v | Second endpoint or element. |
Definition at line 2603 of file MorphologicalTree.hpp.
Tests whether u and v are strictly comparable in the ancestry order.
| u | First endpoint or element. |
| v | Second endpoint or element. |
Definition at line 2621 of file MorphologicalTree.hpp.
Tests whether u is a strict descendant of v.
| u | First endpoint or element. |
| v | Second endpoint or element. |
Definition at line 2612 of file MorphologicalTree.hpp.
|
inline |
Tests whether every live node has a non-empty proper part.
Definition at line 2528 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the optional descriptive hierarchy-family label.
Algorithms must use explicit capabilities such as nodeAltitudeOrder() and the typed construction context instead of dispatching on this label.
Definition at line 2146 of file MorphologicalTree.hpp.
|
inline |
Returns all live leaf nodes in the current hierarchy.
Definition at line 2117 of file MorphologicalTree.hpp.
Returns the lowest common ancestor of u and v.
Queries take O(1) time once the required caches exist. For N internal node slots, DFS intervals require O(N) time and storage and resolve comparable pairs. The first incomparable pair may additionally build an Euler/RMQ cache in O(N log(N + 1)) time and storage. The tree retains these caches until the corresponding topology state is invalidated.
| u | First internal node identifier. |
| v | Second internal node identifier. |
Definition at line 2637 of file MorphologicalTree.hpp.
|
inline |
Returns lowest common ancestors for a batch of node pairs.
Invalid or dead endpoints produce InvalidNode. An existing persistent Euler/RMQ cache is reused. When that cache has not been built, DFS intervals first resolve equality, ancestry, and disconnection. The remaining incomparable pairs use streamed RMQ or iterative offline Tarjan, selected from their estimated storage.
| queries | Pairwise node queries. |
queries. Definition at line 2656 of file MorphologicalTree.hpp.
Merges nodeId into its parent and releases the emptied slot.
This is a safe committed edit: children and direct proper parts are transferred to the parent before the node slot is released. The operation advances the tree mutation version and invalidates derived state.
| nodeId | Dense internal node identifier. |
Definition at line 2877 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the global parent-to-child altitude ordering constraint.
Definition at line 2160 of file MorphologicalTree.hpp.
|
inline |
Returns a fail-fast range over the pixels in the support of nodeId.
The range walks the subtree rooted at nodeId and yields every pixel in the proper parts of those nodes, without materialising a vector.
| nodeId | Dense internal node identifier. |
Definition at line 2716 of file MorphologicalTree.hpp.
Returns the number of direct children of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 1951 of file MorphologicalTree.hpp.
|
inline |
Returns the number of columns in the regular 2D pixel domain.
Definition at line 2301 of file MorphologicalTree.hpp.
Returns the number of internal descendants of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 1962 of file MorphologicalTree.hpp.
|
inline |
Returns the size of the dense internal-node id domain.
Some slots may currently be free and therefore not correspond to live nodes.
Definition at line 1817 of file MorphologicalTree.hpp.
|
inline |
Counts the live nodes that currently have no children.
Definition at line 1935 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the number of currently live nodes.
Definition at line 2208 of file MorphologicalTree.hpp.
|
inline |
Returns the cardinality of the pixel domain.
Definition at line 1824 of file MorphologicalTree.hpp.
|
inline |
Returns the number of rows in the regular 2D pixel domain.
Definition at line 2294 of file MorphologicalTree.hpp.
Returns the number of siblings of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 1974 of file MorphologicalTree.hpp.
|
delete |
Copy assignment is disabled to keep topology storage explicit.
|
inline |
Move-assigns a complete committed topology.
Both owners must be outside edit sessions so no editor can retain a pointer to storage that changes owner.
| other | Object to compare with or transfer from. |
Definition at line 1660 of file MorphologicalTree.hpp.
Returns the direct parent of nodeId.
The root and detached nodes report themselves as parent.
| nodeId | Dense internal node identifier. |
Definition at line 2077 of file MorphologicalTree.hpp.
|
inline |
Returns a post-order traversal range rooted at the connected root.
Definition at line 2726 of file MorphologicalTree.hpp.
|
inline |
Returns a post-order traversal range rooted at rootNodeId.
| rootNodeId | Identifier of the traversal root. |
Definition at line 2734 of file MorphologicalTree.hpp.
|
inline |
Returns a fail-fast range over the pixels in the proper part of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 2702 of file MorphologicalTree.hpp.
Returns the cardinality of the proper part of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 2043 of file MorphologicalTree.hpp.
Prunes the subtree of nodeId, moving all its support to the parent.
This is a safe committed edit: it is a complete local operation and does not intentionally leave the tree in a staged disconnected state, but it still advances the tree mutation version and invalidates derived state.
| nodeId | Dense internal node identifier. |
Definition at line 2829 of file MorphologicalTree.hpp.
|
inline |
Returns the regular 2D domain or rejects a geometry-dependent call.
| context | Operation context or diagnostic label. |
Definition at line 2282 of file MorphologicalTree.hpp.
|
inline |
Rejects stale read-only views that captured an older mutation version.
| expectedVersion | Mutation version required by the operation. |
| context | Operation context or diagnostic label. |
Definition at line 1805 of file MorphologicalTree.hpp.
Rejects operations that require a committed connected topology.
| context | Operation context or diagnostic label. |
Definition at line 2229 of file MorphologicalTree.hpp.
|
inline |
Returns the current hierarchy root.
Definition at line 1882 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns all generic semantic capabilities of this hierarchy.
Definition at line 2153 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the shared-adjacency context, or nullptr.
Definition at line 2170 of file MorphologicalTree.hpp.
Returns the smallest node containing pixel.
| pixel | Pixel in the finite tree domain. |
Definition at line 2098 of file MorphologicalTree.hpp.
Returns the pixel-indexed smallest-node map.
P satisfying pixel in properPart(P[pixel]). Definition at line 2110 of file MorphologicalTree.hpp.
|
inline |
Returns a pre-order traversal range over the subtree of nodeId.
| nodeId | Dense internal node identifier. |
Definition at line 2790 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Returns the topographic convention, or nullptr.
Definition at line 2186 of file MorphologicalTree.hpp.
|
inline |
Validates one rooted tree with a complete smallest-node map and non-empty supports.
This validation is intended for edit-session commits and debug/invariant checks. It is intentionally stronger than the local runtime guards used by low-level mutators.
Definition at line 2310 of file MorphologicalTree.hpp.
|
inlinenoexcept |
Runs strong validation and returns the result instead of throwing.
Definition at line 2511 of file MorphologicalTree.hpp.
|
inline |
Validates the connected-subset invariants and the non-empty proper-part specialization.
| std::runtime_error | if the tree is invalid or any live node has an empty proper part. |
Definition at line 2545 of file MorphologicalTree.hpp.
|
friend |
Allows the native hierarchy materializer to initialize owned topology buffers and construction metadata.
| T | Node-altitude type. |
| hierarchy | Owned hierarchy transferred into the valued tree. |
| preservedExternalNodeIdOffset | Original Higra node-id offset, when present. |
| versionPolicy | Initial mutation-version policy. |
Definition at line 121 of file MorphologicalTree.hpp.
|
friend |
Definition at line 120 of file MorphologicalTree.hpp.
|
friend |
Definition at line 119 of file MorphologicalTree.hpp.