mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
mmcfilters::TreeOfShapesProducer Class Reference

Builds trees of shapes (ToS) using a union-find construction. More...

#include <TreeOfShapesProducer.hpp>

Public Member Functions

 TreeOfShapesProducer (TopographicConvention convention={})
 Creates a tree-of-shapes builder.
 
const TopographicConventionconvention () const noexcept
 Returns the immutable topographic convention selected for this producer.
 
 ~TreeOfShapesProducer ()=default
 Destroys TreeOfShapesProducer.
 
template<class Altitude = std::uint8_t>
TreeOfShapesBuildResult< Altitude > build (const ImageUInt8Ptr &imgPtr) const
 Builds the hierarchy in the altitude scale declared by the convention.
 

Detailed Description

Builds trees of shapes (ToS) using a union-find construction.

The builder interpolates the input image according to the retained TopographicConvention, constructs a max-tree on the interpolated domain, and projects the resulting hierarchy back to the original image domain.

Definition at line 529 of file TreeOfShapesProducer.hpp.

Constructor & Destructor Documentation

◆ TreeOfShapesProducer()

mmcfilters::TreeOfShapesProducer::TreeOfShapesProducer ( TopographicConvention  convention = {})
inlineexplicit

Creates a tree-of-shapes builder.

Parameters
conventionComplete topographic convention.

Definition at line 825 of file TreeOfShapesProducer.hpp.

Member Function Documentation

◆ build()

template<class Altitude = std::uint8_t>
TreeOfShapesBuildResult< Altitude > mmcfilters::TreeOfShapesProducer::build ( const ImageUInt8Ptr imgPtr) const
inline

Builds the hierarchy in the altitude scale declared by the convention.

Under TopographicAltitudeEncoding::UInt8 the published altitudes are unchanged source gray levels. This encoding is exact for a complementary-grid immersion and for a self-dual span immersion without an exterior ring. Under TopographicAltitudeEncoding::ExactDoubled, even values represent source gray levels and odd values represent half levels introduced by self-dual interpolation. Neither encoding loses a parent-child altitude distinction to quantization.

Template Parameters
AltitudePublished node-altitude type, which must match the altitude encoding declared by the convention.
Parameters
imgPtrImage.
Returns
The resulting hierarchy in the declared altitude scale.

Definition at line 1564 of file TreeOfShapesProducer.hpp.

◆ convention()

const TopographicConvention & mmcfilters::TreeOfShapesProducer::convention ( ) const
inlinenoexcept

Returns the immutable topographic convention selected for this producer.

Returns
The immutable topographic convention selected for this producer.

Definition at line 833 of file TreeOfShapesProducer.hpp.


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