|
mmcfilters
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::MorphologicalTree) |
| 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::MorphologicalTree) |
| Computes several topology/support-only attributes or groups. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleTopologyAttribute (const ValuedMorphologicalTree< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes one topology/support-only scalar attribute or group on a valued-tree owner. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleTopologyAttribute (const ValuedMorphologicalTreeView< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes one topology/support-only scalar attribute or group on a valued-tree view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeTopologyAttributes (const ValuedMorphologicalTree< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes several topology/support-only attributes or groups on a valued-tree owner. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeTopologyAttributes (const ValuedMorphologicalTreeView< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes several topology/support-only attributes or groups on a valued-tree view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleAttribute (const ValuedMorphologicalTree< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes a single scalar attribute or a full attribute group. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeSingleAttribute (const ValuedMorphologicalTreeView< T > &tree, AttributeOrGroup attr, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes a single scalar attribute or group on a non-owning valued-tree view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static SampledNodeAttributeData< Real > | computeSampledNodeAttribute (const ValuedMorphologicalTree< T > &tree, Attribute attribute, AltitudeDifference< T > altitudeStep, int samplingRadius, NodeAttributeSamplingPolicy samplingPolicy=NodeAttributeSamplingPolicy::LargestSupportDescendant, MissingNodeAttributeSamplePolicy missingSamplePolicy=MissingNodeAttributeSamplePolicy::RepeatNearest, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Samples one scalar node attribute at altitude-based positions. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static SampledNodeAttributeData< Real > | computeSampledNodeAttribute (const ValuedMorphologicalTreeView< T > &tree, Attribute attribute, AltitudeDifference< T > altitudeStep, int samplingRadius, NodeAttributeSamplingPolicy samplingPolicy=NodeAttributeSamplingPolicy::LargestSupportDescendant, MissingNodeAttributeSamplePolicy missingSamplePolicy=MissingNodeAttributeSamplePolicy::RepeatNearest, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Samples one scalar node attribute on a non-owning valued-tree view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeAttributes (const ValuedMorphologicalTree< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| 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 ValuedMorphologicalTreeView< T > &tree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes several scalar attributes and groups on a non-owning valued-tree view. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ComputedAttributeData< Real > | computeAttributesFromAltitudeSpan (const ValuedMorphologicalTreeView< T > &valuedTree, const std::vector< AttributeOrGroup > &attributes, NodeIdSpace outputSpace=NodeIdSpace::MorphologicalTree) |
| Computes attributes over an external altitude span. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static std::vector< Real > | projectNodeValuesToExportedHigra (const ValuedMorphologicalTree< 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 ValuedMorphologicalTree< 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 ValuedMorphologicalTreeView< T > &tree, const AttributeNames &attrNames, std::span< const Real > nodeValues) |
| Projects an internal-node attribute buffer from a valued-tree view to exported Higra layout. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static std::vector< Real > | projectNodeValuesToExportedHigra (const ValuedMorphologicalTreeView< T > &tree, const AttributeNames &attrNames, const std::vector< Real > &nodeValues) |
| Projects a vector-backed internal-node attribute buffer from a valued-tree view to exported Higra layout. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ImagePtr< Real > | computeAttributeMapping (const ValuedMorphologicalTree< T > &tree, Attribute attribute) |
| Projects a node attribute to a pixel image in the original domain. | |
| template<std::floating_point Real = float, AltitudeValue T> | |
| static ImagePtr< Real > | computeAttributeMapping (const ValuedMorphologicalTreeView< T > &tree, Attribute attribute) |
| Projects a node attribute from a valued-tree view to a pixel image. | |
Public facade for attribute computation.
This class is the public facade of the attribute framework. It provides:
AttributePipeline for ordinary valuedTree/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 / NodeAttributeSampleLayout for flat-buffer layout;AttributeResultTypes.hpp for owning public results;AttributePipeline / TopologyAttributeBackend for ordinary requests.Ordinary public attribute computation is expressed through ValuedMorphologicalTree<T> or ValuedMorphologicalTreeView<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 51 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a node attribute to a pixel image in the original domain.
| T | Altitude type owned by tree. |
| tree | Valued tree supplying topology and dense altitude data. |
| attribute | Scalar attribute to compute and map. |
Definition at line 578 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a node attribute from a valued-tree view to a pixel image.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree view supplying topology and dense altitude data. |
| attribute | Scalar attribute to compute and map. |
Definition at line 584 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 | Valued 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 521 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several scalar attributes and groups on a non-owning valued-tree view.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree 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 527 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. ValuedMorphologicalTreeView<T> is the named non-owning form of the same topology plus external-altitude contract.
| T | Altitude type borrowed by valuedTree. |
| valuedTree | Valued-tree 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 534 of file AttributeComputation.hpp.
|
inlinestatic |
Samples one scalar node attribute at altitude-based positions.
| T | Altitude type owned by tree. |
| tree | Valued tree supplying topology and dense altitude data. |
| attribute | Scalar node attribute to compute before sampling. |
| altitudeStep | Positive altitude distance between sample positions. |
| samplingRadius | Maximum signed ancestor/descendant sample offset. |
| samplingPolicy | Policy used to select a representative descendant. |
| missingSamplePolicy | Policy used for unavailable sample positions. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace. Definition at line 499 of file AttributeComputation.hpp.
|
inlinestatic |
Samples one scalar node attribute on a non-owning valued-tree view.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree view supplying topology and dense altitude data. |
| attribute | Scalar node attribute to compute before sampling. |
| altitudeStep | Positive altitude distance between sample positions. |
| samplingRadius | Maximum signed ancestor/descendant sample offset. |
| samplingPolicy | Policy used to select a representative descendant. |
| missingSamplePolicy | Policy used for unavailable sample positions. |
| outputSpace | Node-id space requested for the returned buffer. |
outputSpace.| std::runtime_error | If the borrowed topology changed since view construction. |
Definition at line 508 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a single scalar attribute or a full attribute group.
Requests are routed through the typed valued-tree attribute pipeline.
| T | Altitude type owned by tree. |
| tree | Valued 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 486 of file AttributeComputation.hpp.
|
inlinestatic |
Computes a single scalar attribute or group on a non-owning valued-tree view.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree 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 492 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 446 of file AttributeComputation.hpp.
|
inlinestatic |
Computes one topology/support-only scalar attribute or group on a valued-tree owner.
| T | Altitude type owned by tree. |
| tree | Valued 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 458 of file AttributeComputation.hpp.
|
inlinestatic |
Computes one topology/support-only scalar attribute or group on a valued-tree view.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree 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 464 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 452 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several topology/support-only attributes or groups on a valued-tree owner.
| T | Altitude type owned by tree. |
| tree | Valued 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 472 of file AttributeComputation.hpp.
|
inlinestatic |
Computes several topology/support-only attributes or groups on a valued-tree view.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree 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 478 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a vector-backed internal-node attribute buffer to exported Higra layout.
| T | Altitude type owned by tree. |
| tree | Valued 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 548 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 [pixel leaves | live internal nodes]. Rows for pixel leaves 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 | Valued 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 542 of file AttributeComputation.hpp.
|
inlinestatic |
Projects a vector-backed internal-node attribute buffer from a valued-tree view to exported Higra layout.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree 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 572 of file AttributeComputation.hpp.
|
inlinestatic |
Projects an internal-node attribute buffer from a valued-tree view to exported Higra layout.
| T | Altitude type borrowed by tree. |
| tree | Valued-tree 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 554 of file AttributeComputation.hpp.