|
mmcfilters
Public API documentation
|
Builds max-trees and min-trees with union-find. More...
#include <ComponentTreeBuilder.hpp>
Public Member Functions | |
| ComponentTreeBuilder (RegularGridAdjacency2D adjacency, bool isMaxTree) noexcept | |
| Configures max-tree or min-tree construction with an owned adjacency. | |
| template<AltitudeValue T> | |
| NativeHierarchyOwned< T > | build (const ImagePtr< T > &image) && |
| Builds and returns the native hierarchy, consuming the builder. | |
Builds max-trees and min-trees with union-find.
The builder owns its adjacency. build() constructs the pixel-parent representation, computes the intrinsic attributes, and transfers the native hierarchy buffers and adjacency to the result, consuming the builder.
Construction and canonicalization follow [BGLWBB07], Section 3.1, Figure 5, also presented in [CG14], Section III-A, Figure 3. This is the union-find variant without union by rank. The min-tree uses the dual gray-level order. Dense node IDs and ownership transfer are native representation choices.
Definition at line 48 of file ComponentTreeBuilder.hpp.
|
inlineexplicitnoexcept |
Configures max-tree or min-tree construction with an owned adjacency.
| adjacency | Adjacency relation taken by value. |
| isMaxTree | Whether to build a max-tree rather than a min-tree. |
Definition at line 232 of file ComponentTreeBuilder.hpp.
|
inline |
Builds and returns the native hierarchy, consuming the builder.
The result owns the adjacency after construction; named builders must be passed through std::move to make that transfer explicit.
| image | Non-null, non-empty image with finite values and the same domain as the connected adjacency. |
Definition at line 244 of file ComponentTreeBuilder.hpp.