mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
mmcfilters::attributes::computers::VolumeComputer Class Reference

Computes cumulative grey-level volume descriptors on the hierarchy. More...

#include <VolumeComputer.hpp>

Static Public Member Functions

template<std::floating_point Real, AltitudeValue T>
static void compute (const AltitudeAttributeComputeContext< Real, T > &context)
 Computes the requested volume descriptors.
 
template<std::floating_point Real, AltitudeValue T>
static void computeUnitRows (const AltitudeUnitAttributeComputeContext< Real, T > &context)
 Materializes volume descriptors for one-pixel unit supports.
 

Static Public Attributes

static constexpr std::string_view familyName = "volume"
 Family name used in dependency-plan diagnostics.
 
static constexpr AttributeComputerFamily family = AttributeComputerFamily::Volume
 Stable family id used by the scheduler.
 
static constexpr AttributeComputerDomain domain = AttributeComputerDomain::Altitude
 Execution domain required by the computer.
 
static constexpr std::array< Attribute, 2 > producedAttributes {Volume, RelativeVolume}
 Canonical list of volume descriptors produced by this computer.
 

Detailed Description

Computes cumulative grey-level volume descriptors on the hierarchy.

This computer exposes two related attributes:

VOLUME is initialised from the node's own proper parts and then aggregated bottom-up. RELATIVE_VOLUME is initialised at zero and accumulates, for each parent/child edge, the absolute altitude difference multiplied by the child subtree area. A final per-node area term is then added so that the descriptor remains expressed in the same unit as a valuedTree support size.

Note
RELATIVE_VOLUME depends on AREA because subtree sizes are needed to weight parent/child altitude differences.

Definition at line 186 of file VolumeComputer.hpp.

Member Function Documentation

◆ compute()

template<std::floating_point Real, AltitudeValue T>
static void mmcfilters::attributes::computers::VolumeComputer::compute ( const AltitudeAttributeComputeContext< Real, T > &  context)
inlinestatic

Computes the requested volume descriptors.

Requires a typed altitude span in dense internal-node order. context.requestedAttributes selects VOLUME, RELATIVE_VOLUME, or both. RELATIVE_VOLUME additionally requires an AREA dependency available through context.dependencies.

Parameters
contextOperation context or diagnostic label.

Definition at line 213 of file VolumeComputer.hpp.

◆ computeUnitRows()

template<std::floating_point Real, AltitudeValue T>
static void mmcfilters::attributes::computers::VolumeComputer::computeUnitRows ( const AltitudeUnitAttributeComputeContext< Real, T > &  context)
inlinestatic

Materializes volume descriptors for one-pixel unit supports.

Unit VOLUME is the smallest-node altitude of the proper part. Unit RELATIVE_VOLUME is 1, matching the scalar support-size unit used by the subtree computation.

Parameters
contextOperation context or diagnostic label.

Definition at line 236 of file VolumeComputer.hpp.

Member Data Documentation

◆ domain

constexpr AttributeComputerDomain mmcfilters::attributes::computers::VolumeComputer::domain = AttributeComputerDomain::Altitude
staticconstexpr

Execution domain required by the computer.

Definition at line 195 of file VolumeComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::VolumeComputer::family = AttributeComputerFamily::Volume
staticconstexpr

Stable family id used by the scheduler.

Definition at line 192 of file VolumeComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::VolumeComputer::familyName = "volume"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 189 of file VolumeComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 2> mmcfilters::attributes::computers::VolumeComputer::producedAttributes {Volume, RelativeVolume}
inlinestaticconstexpr

Canonical list of volume descriptors produced by this computer.

Definition at line 200 of file VolumeComputer.hpp.


The documentation for this class was generated from the following file: