MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
mmcfilters::ContoursComputedIncrementally Class Reference

Arena-based incremental contour extraction and aggregation for MorphologicalTree. More...

#include <ContoursComputedIncrementally.hpp>

Classes

struct  IncrementalContours
 Incremental contour result stored as compact local deltas. More...
 

Public Types

using LocalContourDeltas = detail::ContourDeltaStore
 Compact local contour additions/removals indexed by internal node id.
 

Static Public Member Functions

static LocalContourDeltas extractContourDeltas (const MorphologicalTree &tree)
 Extracts compact local contour additions/removals without materializing aggregate contours.
 
template<AltitudeValue T>
static LocalContourDeltas extractContourDeltas (const WeightedTreeView< T > &tree)
 Extracts compact local contour additions/removals from a weighted view.
 
static IncrementalContours extractCompactContours (const MorphologicalTree &tree)
 Runs incremental contour computation and returns compact contours.
 
template<AltitudeValue T>
static IncrementalContours extractCompactContours (const WeightedTreeView< T > &tree)
 Runs incremental contour computation on a weighted view.
 

Static Public Attributes

static constexpr double ContourSideAdjacencyRadius = 1.0
 Radius of the 4-neighbour side-contour adjacency used by the algorithm.
 

Detailed Description

Arena-based incremental contour extraction and aggregation for MorphologicalTree.

Definition at line 69 of file ContoursComputedIncrementally.hpp.

Member Typedef Documentation

◆ LocalContourDeltas

Compact local contour additions/removals indexed by internal node id.

Definition at line 75 of file ContoursComputedIncrementally.hpp.

Member Function Documentation

◆ extractCompactContours() [1/2]

static IncrementalContours mmcfilters::ContoursComputedIncrementally::extractCompactContours ( const MorphologicalTree tree)
inlinestatic

Runs incremental contour computation and returns compact contours.

This is the component-tree contour algorithm from Da Silva et al. (PRL 2025). For max-trees and min-trees it follows the paper directly. For tree-of-shapes inputs, it computes 4-connected side contours of each projected node support in the original image domain; this ToS use is an implementation extension rather than a claim from the paper.

The contour neighbourhood is intentionally fixed to 4-connectivity because the contour is defined through exposed pixel sides, not through the adjacency relation used to construct the input tree.

Parameters
treeMorphological tree (max-tree, min-tree, or ToS) on which the contour computation is performed.
Returns
IncrementalContours containing compact deltas for contour access.

Example:

auto contour = contours.getContour(nodeId);
std::vector<int> pixels(contour.begin(), contour.end());
static IncrementalContours extractCompactContours(const MorphologicalTree &tree)
Runs incremental contour computation and returns compact contours.
Owning result for one computed scalar attribute layout and buffer.

Definition at line 665 of file ContoursComputedIncrementally.hpp.

◆ extractCompactContours() [2/2]

template<AltitudeValue T>
static IncrementalContours mmcfilters::ContoursComputedIncrementally::extractCompactContours ( const WeightedTreeView< T > &  tree)
inlinestatic

Runs incremental contour computation on a weighted view.

Definition at line 674 of file ContoursComputedIncrementally.hpp.

◆ extractContourDeltas() [1/2]

static LocalContourDeltas mmcfilters::ContoursComputedIncrementally::extractContourDeltas ( const MorphologicalTree tree)
inlinestatic

Extracts compact local contour additions/removals without materializing aggregate contours.

This exposes the CSR-like delta store used internally by IncrementalContours. It is intended for algorithms that consume local contour events directly, such as incremental distance-transform updates.

Definition at line 626 of file ContoursComputedIncrementally.hpp.

◆ extractContourDeltas() [2/2]

template<AltitudeValue T>
static LocalContourDeltas mmcfilters::ContoursComputedIncrementally::extractContourDeltas ( const WeightedTreeView< T > &  tree)
inlinestatic

Extracts compact local contour additions/removals from a weighted view.

Definition at line 635 of file ContoursComputedIncrementally.hpp.

Member Data Documentation

◆ ContourSideAdjacencyRadius

constexpr double mmcfilters::ContoursComputedIncrementally::ContourSideAdjacencyRadius = 1.0
staticconstexpr

Radius of the 4-neighbour side-contour adjacency used by the algorithm.

Definition at line 72 of file ContoursComputedIncrementally.hpp.


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