mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mmcfilters::ComponentTreeBuilder Class Reference

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.
 

Detailed Description

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.

Scientific references
  • [BGLWBB07] Christophe Berger, Thierry Géraud, Roland Levillain, Nicolas Widynski, Anthony Baillard, and Emmanuel Bertin, "Effective Component Tree Computation with Application to Pattern Recognition in Astronomical Imaging," 2007 IEEE International Conference on Image Processing (ICIP), vol. 4, pp. IV-41-IV-44, 2007. DOI: 10.1109/ICIP.2007.4379949.
  • [CG14] Edwin Carlinet and Thierry Géraud, "A Comparative Review of Component Tree Computation Algorithms," IEEE Transactions on Image Processing, vol. 23, no. 9, pp. 3885-3895, 2014. DOI: 10.1109/TIP.2014.2336551.

Definition at line 48 of file ComponentTreeBuilder.hpp.

Constructor & Destructor Documentation

◆ ComponentTreeBuilder()

mmcfilters::ComponentTreeBuilder::ComponentTreeBuilder ( RegularGridAdjacency2D  adjacency,
bool  isMaxTree 
)
inlineexplicitnoexcept

Configures max-tree or min-tree construction with an owned adjacency.

Parameters
adjacencyAdjacency relation taken by value.
isMaxTreeWhether to build a max-tree rather than a min-tree.

Definition at line 232 of file ComponentTreeBuilder.hpp.

Member Function Documentation

◆ build()

template<AltitudeValue T>
NativeHierarchyOwned< T > mmcfilters::ComponentTreeBuilder::build ( const ImagePtr< T > &  image) &&
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.

Parameters
imageNon-null, non-empty image with finite values and the same domain as the connected adjacency.
Returns
Owning hierarchy independent of the builder and source image.

Definition at line 244 of file ComponentTreeBuilder.hpp.


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