|
mmcfilters
Public API documentation
|
Wrapper pairing MorphologicalTree topology with an external altitude buffer.
More...
#include <ValuedMorphologicalTree.hpp>
Public Types | |
| using | AltitudeType = T |
| Altitude scalar type stored by this valued morphological tree. | |
| using | NodeAltitudeBuffer = mmcfilters::NodeAltitudeBuffer< T > |
Dense altitude buffer indexed by internal NodeId. | |
Public Member Functions | |
| ValuedMorphologicalTree (const ValuedMorphologicalTree &)=delete | |
| Disables copy construction. | |
| ValuedMorphologicalTree & | operator= (const ValuedMorphologicalTree &)=delete |
| Disables copy assignment. | |
| ValuedMorphologicalTree (ValuedMorphologicalTree &&other) | |
| Transfers committed topology and altitude ownership. | |
| ValuedMorphologicalTree & | operator= (ValuedMorphologicalTree &&other) |
| Move-assigns committed topology and altitude ownership. | |
| ValuedMorphologicalTree (detail::MorphologicalTreeConstructionTag, MorphologicalTree &&topology, NodeAltitudeBuffer &&altitude) | |
| Consumes a producer-owned altitude buffer in the internal node-id domain. | |
| void | validateNodeAltitudeBufferShape () const |
| Checks that the altitude buffer covers the dense internal-node domain. | |
| const MorphologicalTree & | topology () const noexcept |
| Returns read-only access to the owned topology. | |
| const NodeAltitudeBuffer & | nodeAltitudes () const noexcept |
Returns the dense altitude buffer indexed by internal NodeId. | |
| NodeAltitudeSpan< T > | nodeAltitudeSpan () const noexcept |
| Returns a read-only span over the dense altitude buffer. | |
| ValuedMorphologicalTreeView< T > | asView () const |
| Creates a non-owning valued-tree view over this owner. | |
| void | setNodeAltitudes (NodeAltitudeBuffer altitudeBuffer) |
| Replaces the owned altitude buffer after full validation. | |
| void | validateMonotoneNodeAltitudes () const |
| Validates the current altitude buffer against the topology order. | |
| T | nodeAltitude (NodeId nodeId) const |
| Returns one live node altitude from the dense buffer. | |
| void | setNodeAltitude (NodeId nodeId, T value) |
| Updates one live node altitude with local monotonicity validation. | |
| void | pruneNode (NodeId nodeId) |
| Prunes a complete subtree through the owned topology. | |
| void | mergeNodeIntoParent (NodeId nodeId) |
| Merges one node into its parent through the owned topology. | |
| AltitudeDifference< T > | nodeResidue (NodeId nodeId) const |
| Returns the altitude difference between a node and its parent. | |
| ImagePtr< T > | reconstructFromNodeAltitudes () const |
| Reconstructs an image by assigning each proper part its smallest-node altitude. | |
| template<class Contribution > requires (std::is_arithmetic_v<Contribution> && !std::is_same_v<std::remove_cv_t<Contribution>, bool>) | |
| ImagePtr< Contribution > | reconstructFromNodeContributions (std::span< const Contribution > nodeContributions) const |
| Reconstructs from arbitrary dense node contributions using the fixed zero baseline. | |
| std::pair< std::vector< NodeId >, std::vector< T > > | exportHigraHierarchy () const |
| Exports the current live rooted tree to a new compact Higra parent/altitude representation. | |
| ValuedMorphologicalTreeEditor< T > | edit () |
| Opens the only public entrypoint for staged valued-tree edits. | |
Friends | |
| class | ValuedMorphologicalTreeEditor< T > |
Wrapper pairing MorphologicalTree topology with an external altitude buffer.
ValuedMorphologicalTree owns the mutable topology and node-altitude state internally, indexed by dense internal NodeId. Read-only topology access and valued-tree convenience methods are exposed without leaking structural mutation. Staged structural edits must go through edit(), which returns a ValuedMorphologicalTreeEditor.
Static Higra imports preserve their original node-id domain until the topology is edited. exportHigraHierarchy() creates a new compact Higra domain for the current live rooted tree.
Definition at line 43 of file ValuedMorphologicalTree.hpp.
| using mmcfilters::ValuedMorphologicalTree< T >::AltitudeType = T |
Altitude scalar type stored by this valued morphological tree.
Definition at line 48 of file ValuedMorphologicalTree.hpp.
| using mmcfilters::ValuedMorphologicalTree< T >::NodeAltitudeBuffer = mmcfilters::NodeAltitudeBuffer<T> |
Dense altitude buffer indexed by internal NodeId.
Definition at line 51 of file ValuedMorphologicalTree.hpp.
|
inline |
Transfers committed topology and altitude ownership.
The topology move rejects an active valued-tree editor before any state is transferred.
| other | Object to compare with or transfer from. |
Definition at line 160 of file ValuedMorphologicalTree.hpp.
|
inline |
Consumes a producer-owned altitude buffer in the internal node-id domain.
| topology | Tree topology. |
| altitude | Altitude data indexed by node identifier. |
Definition at line 188 of file ValuedMorphologicalTree.hpp.
|
inline |
Creates a non-owning valued-tree view over this owner.
Definition at line 229 of file ValuedMorphologicalTree.hpp.
|
inline |
Opens the only public entrypoint for staged valued-tree edits.
Definition at line 360 of file ValuedMorphologicalTree.hpp.
|
inline |
Exports the current live rooted tree to a new compact Higra parent/altitude representation.
Attribute buffers are projected through AttributeComputation::projectNodeValuesToExportedHigra() so valued-tree export remains limited to topology and altitudes.
Definition at line 351 of file ValuedMorphologicalTree.hpp.
|
inline |
Merges one node into its parent through the owned topology.
This is the valued-tree counterpart of the safe public topology mutator. Dead slots keep stale altitude values until a compact export is requested.
| nodeId | Dense internal node identifier. |
Definition at line 303 of file ValuedMorphologicalTree.hpp.
|
inline |
Returns one live node altitude from the dense buffer.
| nodeId | Dense internal node identifier. |
Definition at line 260 of file ValuedMorphologicalTree.hpp.
|
inlinenoexcept |
Returns the dense altitude buffer indexed by internal NodeId.
Definition at line 215 of file ValuedMorphologicalTree.hpp.
|
inlinenoexcept |
Returns a read-only span over the dense altitude buffer.
Definition at line 222 of file ValuedMorphologicalTree.hpp.
|
inline |
Returns the altitude difference between a node and its parent.
The project uses a fixed zero reconstruction baseline, so the root residue is equal to the root altitude.
| nodeId | Dense internal node identifier. |
Definition at line 317 of file ValuedMorphologicalTree.hpp.
|
inline |
Move-assigns committed topology and altitude ownership.
Both topology owners must be outside edit sessions. This keeps every active ValuedMorphologicalTreeEditor bound to the storage it opened.
| other | Object to compare with or transfer from. |
Definition at line 171 of file ValuedMorphologicalTree.hpp.
|
inline |
Prunes a complete subtree through the owned topology.
The altitude buffer is kept as the canonical dense valued-tree state; dead slots may retain their old values until a compact export is requested.
| nodeId | Dense internal node identifier. |
Definition at line 290 of file ValuedMorphologicalTree.hpp.
|
inline |
Reconstructs an image by assigning each proper part its smallest-node altitude.
Definition at line 324 of file ValuedMorphologicalTree.hpp.
|
inline |
Reconstructs from arbitrary dense node contributions using the fixed zero baseline.
| Contribution | Arithmetic contribution and output value type. |
| nodeContributions | Dense contribution buffer indexed by the internal node-slot domain. |
Definition at line 336 of file ValuedMorphologicalTree.hpp.
|
inline |
Updates one live node altitude with local monotonicity validation.
| nodeId | Dense internal node identifier. |
| value | Value. |
Definition at line 272 of file ValuedMorphologicalTree.hpp.
|
inline |
Replaces the owned altitude buffer after full validation.
Shape and finite-value checks are followed by validation of the hierarchy's declared global altitude order.
| altitudeBuffer | Altitude or level. |
Definition at line 239 of file ValuedMorphologicalTree.hpp.
|
inlinenoexcept |
Returns read-only access to the owned topology.
This accessor intentionally does not provide a mutable MorphologicalTree handle. Use edit() for staged topology edits or the safe public mutators for complete local changes.
Definition at line 208 of file ValuedMorphologicalTree.hpp.
|
inline |
Validates the current altitude buffer against the topology order.
Definition at line 252 of file ValuedMorphologicalTree.hpp.
|
inline |
Checks that the altitude buffer covers the dense internal-node domain.
Definition at line 197 of file ValuedMorphologicalTree.hpp.
|
friend |
Definition at line 26 of file ValuedMorphologicalTree.hpp.