mmcfilters
Public API documentation
Loading...
Searching...
No Matches
mmcfilters::attributes::computers::GrayLevelStatsComputer Class Reference

Computes grey-level statistics derived from subtree aggregation. More...

#include <GrayLevelStatsComputer.hpp>

Static Public Member Functions

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

Static Public Attributes

static constexpr std::string_view familyName = "gray-level-stats"
 Family name used in dependency-plan diagnostics.
static constexpr AttributeComputerFamily family = AttributeComputerFamily::GrayLevelStats
 Stable family id used by the scheduler.
static constexpr AttributeComputerDomain domain = AttributeComputerDomain::Altitude
 Execution domain required by the computer.
static constexpr std::array< Attribute, 3 > producedAttributes {MeanGrayLevel, GrayLevelVariance, GrayLevelHeight}
 Canonical list of grey-level descriptors produced by this computer.

Detailed Description

Computes grey-level statistics derived from subtree aggregation.

This computer provides three complementary descriptors:

  • MeanGrayLevel: the average grey level over the full subtree support;
  • GrayLevelVariance: the grey-level variance over the full subtree support;
  • GrayLevelHeight: the maximum absolute altitude difference between the node and any node in its subtree.

MeanGrayLevel is obtained from VOLUME / AREA, while GrayLevelVariance combines integer counts, means, and centered sums of squares over child supports. This avoids subtracting two large raw moments. GrayLevelHeight propagates both the minimum and maximum subtree altitudes and measures the farthest endpoint from the current node.

This definition is independent of a descriptive tree family and remains meaningful when parent/child altitudes have no global monotonic order. For monotone max-trees and min-trees it reduces to the traditional one-sided grey-height definition.

Definition at line 246 of file GrayLevelStatsComputer.hpp.

Member Function Documentation

◆ compute()

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

Computes the requested grey-level statistics.

Requires a typed altitude span in dense internal-node order. GrayLevelHeight uses altitude directly. MeanGrayLevel and GrayLevelVariance additionally require VOLUME and AREA dependencies available through context.dependencies.

Parameters
contextOperation context or diagnostic label.

Definition at line 273 of file GrayLevelStatsComputer.hpp.

◆ computeUnitRows()

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

Materializes grey-level statistics for one-pixel unit supports.

Unit MeanGrayLevel equals the smallest-node altitude. Unit GrayLevelVariance and GrayLevelHeight are zero.

Parameters
contextOperation context or diagnostic label.

Definition at line 298 of file GrayLevelStatsComputer.hpp.

Member Data Documentation

◆ domain

AttributeComputerDomain mmcfilters::attributes::computers::GrayLevelStatsComputer::domain = AttributeComputerDomain::Altitude
staticconstexpr

Execution domain required by the computer.

Definition at line 255 of file GrayLevelStatsComputer.hpp.

◆ family

AttributeComputerFamily mmcfilters::attributes::computers::GrayLevelStatsComputer::family = AttributeComputerFamily::GrayLevelStats
staticconstexpr

Stable family id used by the scheduler.

Definition at line 252 of file GrayLevelStatsComputer.hpp.

◆ familyName

std::string_view mmcfilters::attributes::computers::GrayLevelStatsComputer::familyName = "gray-level-stats"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 249 of file GrayLevelStatsComputer.hpp.

◆ producedAttributes

std::array<Attribute, 3> mmcfilters::attributes::computers::GrayLevelStatsComputer::producedAttributes {MeanGrayLevel, GrayLevelVariance, GrayLevelHeight}
inlinestaticconstexpr

Canonical list of grey-level descriptors produced by this computer.

Definition at line 260 of file GrayLevelStatsComputer.hpp.


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