|
MorphologicalAttributeFilters
Public API documentation
|
Incremental bounding-box scalar attribute. More...
#include <DynamicTreeAttributeComputer.hpp>


Public Types | |
| using | buffer_type = typename base_t::buffer_type |
| Dense per-node bounding-box attribute buffer inherited from the dynamic protocol. | |
Public Types inherited from mmcfilters::adjust::DynamicTreeAttributeComputer< T > | |
| using | buffer_type = std::vector< double > |
| Dense per-node attribute buffer used by dynamic adjustment computers. | |
Public Member Functions | |
| DynamicBoundingBoxAttributeComputer (BoundingBoxMeasure measure=BoundingBoxMeasure::DIAGONAL_LENGTH) | |
| Creates a bounding-box computer returning the requested scalar measure. | |
| void | resize (const WeightedMorphologicalTree< T > &tree, buffer_type &buffer) const override |
| Resizes public and auxiliary buffers to the current tree slot space. | |
| void | preProcessing (NodeId nodeId, const WeightedMorphologicalTree< T > &tree, buffer_type &) const override |
| Initializes the subtree box of one node from its direct proper parts. | |
| void | mergeProcessing (NodeId parentId, NodeId childId, const WeightedMorphologicalTree< T > &, buffer_type &) const override |
| Accumulates a child subtree box into its parent subtree box. | |
| void | postProcessing (NodeId nodeId, const WeightedMorphologicalTree< T > &, buffer_type &buffer) const override |
| Converts the accumulated subtree box into the configured scalar measure. | |
| void | onMoveProperParts (NodeId targetId, NodeId sourceId, const WeightedMorphologicalTree< T > &tree) const override |
Updates local boxes after all proper parts move from sourceId to targetId. | |
| void | onMoveProperPart (NodeId targetId, NodeId sourceId, NodeId pixelId, const WeightedMorphologicalTree< T > &tree) const override |
| Updates local boxes after one proper part moves between nodes. | |
| void | onNodeRemoved (NodeId nodeId, const WeightedMorphologicalTree< T > &) const override |
| Clears auxiliary summaries associated with a released node slot. | |
Public Member Functions inherited from mmcfilters::adjust::DynamicTreeAttributeComputer< T > | |
| virtual | ~DynamicTreeAttributeComputer ()=default |
| Destroys a dynamic attribute computer through the protocol base. | |
| void | computeAttribute (const WeightedMorphologicalTree< T > &tree, buffer_type &buffer) const |
| Computes the attribute for the full current tree in post-order. | |
| void | computeAttributeOnNode (const WeightedMorphologicalTree< T > &tree, NodeId nodeId, buffer_type &buffer) const |
| Recomputes one node assuming all direct children are already up to date. | |
Incremental bounding-box scalar attribute.
The computer keeps two levels of cached state:
local_: bounding box of the node's direct proper parts, including enough extremum multiplicities to update most single-pixel removals without a scan;subtree_: bounding box after child aggregation for the current pre/merge/post pass.Single proper-part moves update the receiver eagerly. The donor is kept exact unless the moved pixel exhausts one extremum, in which case its local summary is marked dirty and rebuilt lazily on the next access. This preserves the local-update structure of the Higra version while adapting coordinates to this project's row-major image domain.
Definition at line 231 of file DynamicTreeAttributeComputer.hpp.
| using mmcfilters::adjust::DynamicBoundingBoxAttributeComputer< T >::buffer_type = typename base_t::buffer_type |
Dense per-node bounding-box attribute buffer inherited from the dynamic protocol.
Definition at line 237 of file DynamicTreeAttributeComputer.hpp.
|
inlineexplicit |
Creates a bounding-box computer returning the requested scalar measure.
| measure | Scalar projection materialized from the accumulated bounding-box state. |
Definition at line 473 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Accumulates a child subtree box into its parent subtree box.
Implements mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 500 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Updates local boxes after one proper part moves between nodes.
The target box is enlarged eagerly. The source box remains exact unless the removed pixel exhausts one extremum; in that case the source summary is marked dirty and rebuilt lazily.
Reimplemented from mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 545 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Updates local boxes after all proper parts move from sourceId to targetId.
Reimplemented from mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 532 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Clears auxiliary summaries associated with a released node slot.
Reimplemented from mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 611 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Converts the accumulated subtree box into the configured scalar measure.
Implements mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 507 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Initializes the subtree box of one node from its direct proper parts.
Implements mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 492 of file DynamicTreeAttributeComputer.hpp.
|
inlineoverridevirtual |
Resizes public and auxiliary buffers to the current tree slot space.
Auxiliary direct/local and subtree summaries are indexed by the same dense internal node-id space as the public output buffer.
Reimplemented from mmcfilters::adjust::DynamicTreeAttributeComputer< T >.
Definition at line 482 of file DynamicTreeAttributeComputer.hpp.