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

Computes descriptors derived from the axis-aligned bounding box of the node support. More...

#include <BoundingBoxComputer.hpp>

Static Public Member Functions

template<std::floating_point Real>
static void compute (const AttributeComputeContext< Real > &context)
 Computes the requested bounding-box descriptors.
 
template<std::floating_point Real>
static void computeUnitRows (const UnitAttributeComputeContext< Real > &context)
 Materializes bounding-box descriptors for one-pixel unit supports.
 

Static Public Attributes

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

Detailed Description

Computes descriptors derived from the axis-aligned bounding box of the node support.

For each live node, the computer determines the smallest axis-aligned box that contains the complete subtree support. The support is defined as the union of the node's proper parts and the supports of all descendants. From the box extrema, the computer derives:

The extrema are accumulated in a post-order traversal by initialising each node from its own proper parts and then merging child boxes into the parent. Only RECTANGULARITY depends on the external AREA attribute; all other outputs come directly from the tracked extrema.

Note
The computed box is purely image-domain based. It assumes that the tree exposes a valid original image domain through rows and columns.

Definition at line 215 of file BoundingBoxComputer.hpp.

Member Function Documentation

◆ compute()

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

Computes the requested bounding-box descriptors.

The output buffer is indexed by dense internal node id and interpreted by context.attrNames. context.requestedAttributes selects which columns are written. RECTANGULARITY requires an AREA dependency available through context.dependencies; all other descriptors are computed directly from row-major proper-part coordinates.

Parameters
contextOperation context or diagnostic label.

Definition at line 244 of file BoundingBoxComputer.hpp.

◆ computeUnitRows()

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

Materializes bounding-box descriptors for one-pixel unit supports.

A unit support has width/height 1, rectangularity 1, ratio 1, and min/max coordinates equal to the proper part coordinate.

Parameters
contextOperation context or diagnostic label.

Definition at line 267 of file BoundingBoxComputer.hpp.

Member Data Documentation

◆ domain

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

Execution domain required by the computer.

Definition at line 224 of file BoundingBoxComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::BoundingBoxComputer::family = AttributeComputerFamily::BoundingBox
staticconstexpr

Stable family id used by the scheduler.

Definition at line 221 of file BoundingBoxComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::BoundingBoxComputer::familyName = "bounding-box"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 218 of file BoundingBoxComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 9> mmcfilters::attributes::computers::BoundingBoxComputer::producedAttributes
inlinestaticconstexpr
Initial value:
{BoxWidth, BoundingBoxHeight, DiagonalLength, Rectangularity, RatioWh,
BoxColumnMin, BoxColumnMax, BoxRowMin, BoxRowMax}

Canonical list of bounding-box descriptors produced by this computer.

Definition at line 229 of file BoundingBoxComputer.hpp.


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