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

Computes higher-level shape descriptors derived from second-order central moments. More...

#include <MomentBasedAttributeComputer.hpp>

Static Public Member Functions

template<std::floating_point Real>
static constexpr Real maxFiniteEccentricity () noexcept
 Largest finite eccentricity emitted for degenerate one-dimensional supports.
 
template<std::floating_point Real>
static void compute (const AttributeComputeContext< Real > &context)
 Computes the requested moment-derived descriptors.
 
template<std::floating_point Real>
static void computeUnitRows (const UnitAttributeComputeContext< Real > &context)
 Materializes moment-derived descriptors for one-pixel unit supports.
 

Static Public Attributes

static constexpr std::string_view familyName = "moment-derived"
 Family name used in dependency-plan diagnostics.
 
static constexpr AttributeComputerFamily family = AttributeComputerFamily::MomentDerived
 Stable family id used by the scheduler.
 
static constexpr AttributeComputerDomain domain = AttributeComputerDomain::Topology
 Execution domain required by the computer.
 
static constexpr std::array< Attribute, 7 > producedAttributes
 Canonical list of moment-derived descriptors produced by this computer.
 

Detailed Description

Computes higher-level shape descriptors derived from second-order central moments.

The descriptors produced here summarise the geometry of the equivalent second-moment ellipse associated with each node support. They include:

The computer consumes mu20, mu02, mu11, and AREA. From those values it builds the 2x2 second-moment matrix, extracts its eigenvalues, and uses them to derive the final descriptors.

Note
All computations are local once the dependencies have been produced. No additional tree traversal state is required beyond iterating over the live nodes in post-order.

Definition at line 582 of file MomentBasedAttributeComputer.hpp.

Member Function Documentation

◆ compute()

template<std::floating_point Real>
static void mmcfilters::attributes::computers::MomentBasedAttributeComputer::compute ( const AttributeComputeContext< Real > &  context)
inlinestatic

Computes the requested moment-derived descriptors.

Requires dependencies for CENTRAL_MOMENT_20, CENTRAL_MOMENT_02, CENTRAL_MOMENT_11, and AREA. The dependencies are resolved by name, then each live node is evaluated independently from the second-order moment matrix.

Parameters
contextOperation context or diagnostic label.

Definition at line 619 of file MomentBasedAttributeComputer.hpp.

◆ computeUnitRows()

template<std::floating_point Real>
static void mmcfilters::attributes::computers::MomentBasedAttributeComputer::computeUnitRows ( const UnitAttributeComputeContext< Real > &  context)
inlinestatic

Materializes moment-derived descriptors for one-pixel unit supports.

Eccentricity and circularity are defined as 1 for the degenerate unit support; other descriptors are zero.

Parameters
contextOperation context or diagnostic label.

Definition at line 647 of file MomentBasedAttributeComputer.hpp.

◆ maxFiniteEccentricity()

template<std::floating_point Real>
static constexpr Real mmcfilters::attributes::computers::MomentBasedAttributeComputer::maxFiniteEccentricity ( )
inlinestaticconstexprnoexcept

Largest finite eccentricity emitted for degenerate one-dimensional supports.

Returns
Largest finite eccentricity emitted for degenerate one-dimensional supports.

Definition at line 598 of file MomentBasedAttributeComputer.hpp.

Member Data Documentation

◆ domain

constexpr AttributeComputerDomain mmcfilters::attributes::computers::MomentBasedAttributeComputer::domain = AttributeComputerDomain::Topology
staticconstexpr

Execution domain required by the computer.

Definition at line 591 of file MomentBasedAttributeComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::MomentBasedAttributeComputer::family = AttributeComputerFamily::MomentDerived
staticconstexpr

Stable family id used by the scheduler.

Definition at line 588 of file MomentBasedAttributeComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::MomentBasedAttributeComputer::familyName = "moment-derived"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 585 of file MomentBasedAttributeComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 7> mmcfilters::attributes::computers::MomentBasedAttributeComputer::producedAttributes
inlinestaticconstexpr
Initial value:
{Inertia, Compactness, Eccentricity, LengthMajorAxis,
LengthMinorAxis, AxisOrientation, Circularity}

Canonical list of moment-derived descriptors produced by this computer.

Definition at line 605 of file MomentBasedAttributeComputer.hpp.


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