|
MorphologicalAttributeFilters
Public API documentation
|
Pure operations over a topology and an explicit altitude buffer. More...
#include <TreeAltitudeAlgorithms.hpp>
Static Public Member Functions | |
| template<AltitudeValue T> | |
| static void | validateAltitudeBufferShape (const MorphologicalTree &tree, std::span< const T > altitude) |
| Validates that an altitude buffer covers the dense internal-node domain. | |
| template<AltitudeValue T> | |
| static void | validateFiniteAltitudeValue (T altitude, std::size_t index, const char *context) |
| Rejects non-finite floating-point altitudes while compiling to a no-op for integral types. | |
| template<AltitudeValue T> | |
| static void | validateFiniteAltitudeValues (std::span< const T > altitude, const char *context) |
| Rejects non-finite floating-point altitudes in a contiguous input range. | |
| template<AltitudeValue T> | |
| static void | validateFiniteImageAltitudes (const ImagePtr< T > &image, const char *context) |
| Rejects non-finite floating-point pixels before using an image as altitude source. | |
| template<AltitudeValue T> | |
| static T | getAltitude (std::span< const T > altitude, NodeId nodeId) |
| Reads one node altitude from an explicit altitude buffer. | |
| template<AltitudeValue T> | |
| static AltitudeDiff< T > | getNodeResidue (const MorphologicalTree &tree, std::span< const T > altitude, NodeId nodeId) |
| Computes the altitude difference between one node and its parent. | |
| template<AltitudeValue T> | |
| static std::uint8_t | requireUInt8AltitudeValue (T altitude, NodeId nodeId, const char *context) |
Converts one altitude value to uint8_t, rejecting values outside the output domain. | |
| template<AltitudeValue T> | |
| static void | validateUInt8AltitudeDomain (const MorphologicalTree &tree, std::span< const T > altitude, const char *context) |
Validates all live node altitudes before materialising an ImageUInt8. | |
| template<AltitudeValue T> | |
| static ImagePtr< T > | reconstructImage (const MorphologicalTree &tree, std::span< const T > altitude, const char *context="TreeAltitudeAlgorithms::reconstructImage") |
| Reconstructs a typed image from topology ownership and explicit node altitudes. | |
| template<AltitudeValue T> | |
| static std::pair< std::vector< NodeId >, std::vector< T > > | exportHigraHierarchy (const MorphologicalTree &tree, std::span< const T > altitude) |
| Exports a live rooted topology and explicit altitudes to a compact parent/altitude representation. | |
| template<AltitudeValue T> | |
| static void | validateMonotoneAltitude (const MorphologicalTree &tree, std::span< const T > altitude) |
| Validates altitude monotonicity for max-trees and min-trees. | |
Pure operations over a topology and an explicit altitude buffer.
TreeAltitudeAlgorithms intentionally owns no state. It is the neutral home for algorithms that need only MorphologicalTree + std::span<const T>, leaving WeightedMorphologicalTree<std::uint8_t> as an owner/adaptor for canonical mutable state.
Definition at line 26 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Exports a live rooted topology and explicit altitudes to a compact parent/altitude representation.
This method owns only the structural weighted export. It reuses detail::computeExportedHigraLayout() so the parent/altitude export has the same compact id convention used by attribute-buffer projection in AttributeComputation.
Definition at line 174 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Reads one node altitude from an explicit altitude buffer.
Definition at line 85 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Computes the altitude difference between one node and its parent.
Definition at line 96 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Reconstructs a typed image from topology ownership and explicit node altitudes.
The reconstructed pixel type is the altitude type itself. This method does not clamp, convert, or validate altitude values; it only checks the buffer shape before indexing it through the topology.
Definition at line 151 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Converts one altitude value to uint8_t, rejecting values outside the output domain.
Definition at line 113 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Validates that an altitude buffer covers the dense internal-node domain.
Definition at line 32 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Rejects non-finite floating-point altitudes while compiling to a no-op for integral types.
Definition at line 42 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Rejects non-finite floating-point altitudes in a contiguous input range.
Definition at line 58 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Rejects non-finite floating-point pixels before using an image as altitude source.
Definition at line 70 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Validates altitude monotonicity for max-trees and min-trees.
Definition at line 211 of file TreeAltitudeAlgorithms.hpp.
|
inlinestatic |
Validates all live node altitudes before materialising an ImageUInt8.
Definition at line 136 of file TreeAltitudeAlgorithms.hpp.