This document summarizes only the published main line of
MorphoTreeAdjust.
For public use, read first:
The central points of the repository are:
- MorphoTreeAdjust.hpp recommended public entry point for C++
- AdjacencyRelation.hpp adjacency relation used on the image
- DynamicComponentTree.hpp dynamic max-tree and min-tree representation
- AttributeComputer.hpp incremental attributes associated with each node
- DualMinMaxTreeIncrementalFilter.hpp subtree-based dual min/max incremental filter
- DualMinMaxTreeIncrementalFilterLeaf.hpp leaf-based dual min/max incremental filter
- ComponentTreeCasf.hpp CASF over the dynamic-tree core
- morphoTreeAdjust.cpp bindings Python via pybind11
The main code flow can be read as follows:
AdjacencyRelationdefines the domain and connectivity.DynamicComponentTreematerializes the base dynamic tree.AttributeComputerand the dynamic attributes track the nodes.DualMinMaxTreeIncrementalFilterandDualMinMaxTreeIncrementalFilterLeafupdate the dual tree after pruning in the primal tree.ComponentTreeCasforganizes that mechanism to apply CASF.morphoTreeAdjust.cppexposes the same layer to Python.
The most important costs in the repository today are in:
- initial construction of
DynamicComponentTree; - incremental update executed by
DualMinMaxTreeIncrementalFilter; - the leaf-based variant in
DualMinMaxTreeIncrementalFilterLeaf; - repeated filter application in
ComponentTreeCasf.
In practical terms:
- the
leafvariant usually increases the number of processed events; - the
subtreevariant usually concentrates more work per event; - the cost difference depends on the image, the polarity, and the CASF threshold schedule.
To study or validate the core, the most useful places are:
- unit-tests
- dev-tools/tools
- dev-tools/benchmarks/jmiv2026_benchmark.cpp
- examples/core_cpp_api_example.cpp
- examples/core_python_api_example.py
If you want to understand the repository core in sequence: