|
MorphologicalAttributeFilters
Public API documentation
|
Public facade for attribute computation. More...
#include <AttributeComputation.hpp>
Static Public Member Functions | |
| template<std::floating_point Real = float> | |
| static ComputedAttributeData< Real > | computeSingleTopologyAttribute (const MorphologicalTree &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes one topology/support-only scalar attribute or group. | |
| template<std::floating_point Real = float> | |
| static ComputedAttributeData< Real > | computeTopologyAttributes (const MorphologicalTree &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes several topology/support-only attributes or groups. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleTopologyAttribute (const WeightedMorphologicalTree< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes one topology/support-only scalar attribute or group on a weighted owner. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleTopologyAttribute (const WeightedTreeView< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes one topology/support-only scalar attribute or group on a weighted view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeTopologyAttributes (const WeightedMorphologicalTree< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes several topology/support-only attributes or groups on a weighted owner. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeTopologyAttributes (const WeightedTreeView< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes several topology/support-only attributes or groups on a weighted view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleAttribute (const WeightedMorphologicalTree< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes a single scalar attribute or a full attribute group. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleAttribute (const WeightedTreeView< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes a single scalar attribute or group on a non-owning weighted view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeDataWithDelta< Real > | computeSingleAttributeWithDelta (const WeightedMorphologicalTree< T > &tree, Attribute attribute, AltitudeDiff< T > deltaStep, int radius, std::string padding="last-padding", NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes a delta-augmented version of one scalar attribute. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeDataWithDelta< Real > | computeSingleAttributeWithDelta (const WeightedTreeView< T > &tree, Attribute attribute, AltitudeDiff< T > deltaStep, int radius, std::string padding="last-padding", NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes a delta-augmented scalar attribute on a non-owning weighted view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeAttributes (const WeightedMorphologicalTree< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes a heterogeneous set of scalar attributes and attribute groups in one coordinated run. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeAttributes (const WeightedTreeView< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes several scalar attributes and groups on a non-owning weighted view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeAttributesFromAltitudeSpan (const WeightedTreeView< T > &weighted, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE) |
| Computes attributes over an external altitude span. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static std::vector< Real > | projectNodeValuesToExportedHigra (const WeightedMorphologicalTree< T > &tree, const AttributeNames &attrNames, std::span< const Real > nodeValues) |
Projects an already computed internal-node attribute buffer to the compact Higra layout produced by TreeAltitudeAlgorithms::exportHigraHierarchy(). | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static std::vector< Real > | projectNodeValuesToExportedHigra (const WeightedMorphologicalTree< T > &tree, const AttributeNames &attrNames, const std::vector< Real > &nodeValues) |
| Projects a vector-backed internal-node attribute buffer to exported Higra layout. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static std::vector< Real > | projectNodeValuesToExportedHigra (const WeightedTreeView< T > &tree, const AttributeNames &attrNames, std::span< const Real > nodeValues) |
| Projects an internal-node attribute buffer from a weighted view to exported Higra layout. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static std::vector< Real > | projectNodeValuesToExportedHigra (const WeightedTreeView< T > &tree, const AttributeNames &attrNames, const std::vector< Real > &nodeValues) |
| Projects a vector-backed internal-node attribute buffer from a weighted view to exported Higra layout. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ImagePtr< Real > | computeAttributeMapping (const WeightedMorphologicalTree< T > &tree, Attribute attribute) |
| Projects a node attribute to a proper-part image in the original domain. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ImagePtr< Real > | computeAttributeMapping (const WeightedTreeView< T > &tree, Attribute attribute) |
| Projects a node attribute from a weighted view to a proper-part image. | |
Public facade for attribute computation.
This class is the public facade of the attribute framework. It provides:
AttributePipeline for ordinary weighted/topology requests;MorphologicalTree node-id space to other public node-id spaces such as the preserved imported Higra convention;The surrounding attribute subsystem is organised around:
AttributeNames / AttributeNamesWithDelta for flat-buffer layout;AttributeResultTypes.hpp for owning public results;AttributePipeline / TopologyAttributeBackend for ordinary requests.Ordinary public attribute computation is expressed through WeightedMorphologicalTree<T> or WeightedTreeView<T>, so altitude-dependent requests always carry an explicit altitude contract. Plain MorphologicalTree remains public only for topology-only requests.
The canonical execution space is always the tree's dense internal node-id space. Projection to the preserved imported Higra space only happens at the boundary of the public API. Attribute value buffers are materialized as float by default; public methods can select any std::floating_point output Real type, with double supported by the packaged Python bindings. The public Real controls result storage. Ordinary facade computations run their internal attribute pipeline in double and cast only at the API boundary.
Definition at line 50 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a node attribute to a proper-part image in the original domain.
| T | Altitude type owned by tree. |
| tree | Weighted tree supplying topology and dense altitude data. |
| attribute | Scalar attribute to compute and map. |
Definition at line 559 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a node attribute from a weighted view to a proper-part image.
| T | Altitude type borrowed by tree. |
| tree | Weighted view supplying topology and dense altitude data. |
| attribute | Scalar attribute to compute and map. |
Definition at line 565 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a heterogeneous set of scalar attributes and attribute groups in one coordinated run.
Requests are routed to AttributePipeline. That path combines typed altitude kernels with the topology backend and returns a single layout containing exactly the requested scalar attributes.
| T | Altitude type owned by tree. |
| tree | Weighted tree supplying topology and dense altitude data. |
| attributes | Scalar attributes and groups to compute. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 486 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several scalar attributes and groups on a non-owning weighted view.
| T | Altitude type borrowed by tree. |
| tree | Weighted view supplying topology and dense altitude data. |
| attributes | Scalar attributes and groups to compute. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::runtime_error | If the borrowed topology changed since view construction. |
Definition at line 491 of file AttributeComputation.hpp.
|
inlinestatic |
Computes attributes over an external altitude span.
Attributes that read altitude use templated kernels. Attributes that are independent from altitude are delegated to the topology backend, avoiding an altitude copy or conversion. WeightedTreeView<T> is the named non-owning form of the same topology plus external-altitude contract.
| T | Altitude type borrowed by weighted. |
| weighted | Weighted view supplying topology and dense altitude data. |
| attributes | Scalar attributes and groups to compute. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 497 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a single scalar attribute or a full attribute group.
Requests are routed through the typed weighted-tree attribute pipeline.
| T | Altitude type owned by tree. |
| tree | Weighted tree supplying topology and dense altitude data. |
| attr | Scalar attribute or group to compute. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 454 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a single scalar attribute or group on a non-owning weighted view.
| T | Altitude type borrowed by tree. |
| tree | Weighted view supplying topology and dense altitude data. |
| attr | Scalar attribute or group to compute. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::runtime_error | If the borrowed topology changed since view construction. |
Definition at line 459 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a delta-augmented version of one scalar attribute.
| T | Altitude type owned by tree. |
| tree | Weighted tree supplying topology and dense altitude data. |
| attribute | Scalar attribute to compute before delta sampling. |
| deltaStep | Typed altitude distance between consecutive materialised offsets. |
| radius | Maximum signed ancestor/descendant offset to materialise. |
| padding | Strategy used when the requested offset leaves the valid ancestor/descendant chain. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 464 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a delta-augmented scalar attribute on a non-owning weighted view.
| T | Altitude type borrowed by tree. |
| tree | Weighted view supplying topology and dense altitude data. |
| attribute | Scalar attribute to compute before delta sampling. |
| deltaStep | Typed altitude distance between consecutive materialised offsets. |
| radius | Maximum signed ancestor/descendant offset to materialise. |
| padding | Strategy used when the requested offset leaves the valid chain. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::runtime_error | If the borrowed topology changed since view construction. |
Definition at line 469 of file AttributeComputation.hpp.
|
inlinestatic |
Computes one topology/support-only scalar attribute or group.
| tree | Topology whose dense internal NodeId domain indexes the result. |
| attr | Scalar attribute or group that must not require altitude. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::invalid_argument | If attr requires altitude or outputSpace is unavailable for tree. |
Definition at line 408 of file AttributeComputation.hpp.
|
inlinestatic |
Computes one topology/support-only scalar attribute or group on a weighted owner.
| T | Altitude type owned by tree. |
| tree | Weighted tree whose topology defines the node-id domain. |
| attr | Scalar attribute or group that must not require altitude. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 420 of file AttributeComputation.hpp.
|
inlinestatic |
Computes one topology/support-only scalar attribute or group on a weighted view.
| T | Altitude type borrowed by tree. |
| tree | Weighted view whose topology defines the node-id domain. |
| attr | Scalar attribute or group that must not require altitude. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::runtime_error | If the borrowed topology changed since view construction. |
Definition at line 425 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several topology/support-only attributes or groups.
| tree | Topology whose dense internal NodeId domain indexes the result. |
| attributes | Scalar attributes and groups that must not require altitude. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::invalid_argument | If any request requires altitude or the output space is unavailable for tree. |
Definition at line 414 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several topology/support-only attributes or groups on a weighted owner.
| T | Altitude type owned by tree. |
| tree | Weighted tree whose topology defines the node-id domain. |
| attributes | Scalar attributes and groups that must not require altitude. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 437 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several topology/support-only attributes or groups on a weighted view.
| T | Altitude type borrowed by tree. |
| tree | Weighted view whose topology defines the node-id domain. |
| attributes | Scalar attributes and groups that must not require altitude. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::runtime_error | If the borrowed topology changed since view construction. |
Definition at line 442 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a vector-backed internal-node attribute buffer to exported Higra layout.
| T | Altitude type owned by tree. |
| tree | Weighted tree defining the current exported Higra hierarchy. |
| attrNames | Layout of the input nodeValues columns. |
| nodeValues | Dense internal-node buffer in row-major layout. |
Definition at line 515 of file AttributeComputation.hpp.
|
inlinestatic |
Projects an already computed internal-node attribute buffer to the compact Higra layout produced by TreeAltitudeAlgorithms::exportHigraHierarchy().
nodeValues must be row-major by dense internal NodeId, with one column per attribute described by attrNames. The exported buffer follows the compact Higra convention [proper parts | live internal nodes]. Unit proper-part rows are computed by the export projection path for each requested attribute, and internal-node rows are copied from nodeValues using the same layout helper as hierarchy export.
| T | Altitude type owned by tree. |
| tree | Weighted tree defining the current exported Higra hierarchy. |
| attrNames | Layout of the input nodeValues columns. |
| nodeValues | Dense internal-node buffer in row-major layout. |
Definition at line 507 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a vector-backed internal-node attribute buffer from a weighted view to exported Higra layout.
| T | Altitude type borrowed by tree. |
| tree | Weighted view defining topology and unit-component altitude data. |
| attrNames | Layout of the input nodeValues columns. |
| nodeValues | Dense internal-node buffer in row-major layout. |
Definition at line 551 of file AttributeComputation.hpp.
|
inlinestatic |
Projects an internal-node attribute buffer from a weighted view to exported Higra layout.
| T | Altitude type borrowed by tree. |
| tree | Weighted view defining topology and unit-component altitude data. |
| attrNames | Layout of the input nodeValues columns. |
| nodeValues | Dense internal-node buffer in row-major layout. |
Definition at line 523 of file AttributeComputation.hpp.