mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
mmcfilters::UltimateAttributeOpening< T, Real > Class Template Reference

Computes an Ultimate Attribute Opening by accumulating maximal contrasts. More...

#include <UltimateAttributeOpening.hpp>

Public Types

using attribute_value_type = Real
 Floating-point type used for the input attribute buffer and thresholds.
 

Public Member Functions

 UltimateAttributeOpening (const AltitudeView &view, const std::shared_ptr< Real[]> &attrs_increasing)
 Creates a UAO computation over a non-owning valued-tree view.
 
 UltimateAttributeOpening (const AltitudeView &view, const std::vector< Real > &attrs_increasing)
 Creates a UAO computation over a non-owning valued-tree view.
 
 UltimateAttributeOpening (const AltitudeView &view, const Real *attrs_increasing)
 Creates a UAO computation over a non-owning valued-tree view.
 
 UltimateAttributeOpening (const ValuedMorphologicalTree< T > &valuedTree, const std::shared_ptr< Real[]> &attrs_increasing)
 Creates a UAO computation over a borrowed valued tree.
 
 UltimateAttributeOpening (const ValuedMorphologicalTree< T > &valuedTree, const std::vector< Real > &attrs_increasing)
 Creates a UAO computation over a borrowed valued tree.
 
 UltimateAttributeOpening (const ValuedMorphologicalTree< T > &valuedTree, const Real *attrs_increasing)
 Creates a UAO computation over a borrowed valued tree.
 
 ~UltimateAttributeOpening ()=default
 Destroys the ultimate-attribute-opening evaluator.
 
void execute (Real maximumAttributeThreshold)
 Executes UAO using all internal tree nodes as selectable candidates.
 
void execute (Real maximumAttributeThreshold, const std::vector< uint8_t > &selectedForFiltering)
 Executes UAO with an explicit node-selection mask.
 
void executeWithMSER (Real maximumAttributeThreshold, AltitudeDifference< T > altitudeWindowRadius)
 Executes UAO with an MSER-derived node-selection mask.
 
void executeWithDepthStability (Real maximumAttributeThreshold, int depthWindowRadius)
 Executes UAO with a depth-stability node-selection mask.
 
ImagePtr< T > getMaxContrastImage () const
 Returns the per-pixel maximum UAO contrast image.
 
ImageInt32Ptr getAssociatedImage () const
 Returns the per-pixel associated attribute-index image.
 
ImageUInt8Ptr getAssociatedColorImage () const
 Returns a color rendering of the associated-index image.
 

Detailed Description

template<AltitudeValue T, std::floating_point Real = float>
class mmcfilters::UltimateAttributeOpening< T, Real >

Computes an Ultimate Attribute Opening by accumulating maximal contrasts.

The object consumes an increasing attribute buffer indexed by dense internal NodeId and computes, for each image point, the maximum altitude contrast and the associated attribute index selected by the UAO traversal. The result is materialised through image-producing accessors after execute(...) or executeWithMSER(...).

Like other valued-tree filter objects, it captures the tree mutation version at construction time and rejects public operations after topology mutation.

Template Parameters
TAltitude type used by the valued tree or valued-tree view.
RealAttribute-buffer floating-point type.

Definition at line 38 of file UltimateAttributeOpening.hpp.

Member Typedef Documentation

◆ attribute_value_type

template<AltitudeValue T, std::floating_point Real = float>
using mmcfilters::UltimateAttributeOpening< T, Real >::attribute_value_type = Real

Floating-point type used for the input attribute buffer and thresholds.

Definition at line 41 of file UltimateAttributeOpening.hpp.

Constructor & Destructor Documentation

◆ UltimateAttributeOpening() [1/6]

template<AltitudeValue T, std::floating_point Real = float>
mmcfilters::UltimateAttributeOpening< T, Real >::UltimateAttributeOpening ( const AltitudeView view,
const std::shared_ptr< Real[]> &  attrs_increasing 
)
inline

Creates a UAO computation over a non-owning valued-tree view.

Parameters
viewValued tree view whose topology and altitude define the reconstruction domain.
attrs_increasingShared increasing-attribute buffer indexed by dense internal NodeId.

Definition at line 250 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [2/6]

template<AltitudeValue T, std::floating_point Real = float>
mmcfilters::UltimateAttributeOpening< T, Real >::UltimateAttributeOpening ( const AltitudeView view,
const std::vector< Real > &  attrs_increasing 
)
inline

Creates a UAO computation over a non-owning valued-tree view.

Parameters
viewValued tree view whose topology and altitude define the reconstruction domain.
attrs_increasingIncreasing-attribute values indexed by dense internal NodeId.
Exceptions
std::invalid_argumentIf attrs_increasing does not match the internal node slot count.

Definition at line 265 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [3/6]

template<AltitudeValue T, std::floating_point Real = float>
mmcfilters::UltimateAttributeOpening< T, Real >::UltimateAttributeOpening ( const AltitudeView view,
const Real *  attrs_increasing 
)
inline

Creates a UAO computation over a non-owning valued-tree view.

Parameters
viewValued tree view whose topology and altitude define the reconstruction domain.
attrs_increasingNon-null increasing-attribute buffer indexed by dense internal NodeId.
Exceptions
std::invalid_argumentIf attrs_increasing is null or if the view topology is stale.

Definition at line 278 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [4/6]

template<AltitudeValue T, std::floating_point Real = float>
mmcfilters::UltimateAttributeOpening< T, Real >::UltimateAttributeOpening ( const ValuedMorphologicalTree< T > &  valuedTree,
const std::shared_ptr< Real[]> &  attrs_increasing 
)
inline

Creates a UAO computation over a borrowed valued tree.

The valued tree is borrowed; it must outlive this object.

Parameters
valuedTreeValued tree whose topology and altitude define the reconstruction domain.
attrs_increasingShared increasing-attribute buffer indexed by dense internal NodeId.

Definition at line 296 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [5/6]

template<AltitudeValue T, std::floating_point Real = float>
mmcfilters::UltimateAttributeOpening< T, Real >::UltimateAttributeOpening ( const ValuedMorphologicalTree< T > &  valuedTree,
const std::vector< Real > &  attrs_increasing 
)
inline

Creates a UAO computation over a borrowed valued tree.

The valued tree is borrowed; it must outlive this object.

Parameters
valuedTreeValued tree whose topology and altitude define the reconstruction domain.
attrs_increasingIncreasing-attribute values indexed by dense internal NodeId.
Exceptions
std::invalid_argumentIf attrs_increasing does not match the internal node slot count.

Definition at line 313 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [6/6]

template<AltitudeValue T, std::floating_point Real = float>
mmcfilters::UltimateAttributeOpening< T, Real >::UltimateAttributeOpening ( const ValuedMorphologicalTree< T > &  valuedTree,
const Real *  attrs_increasing 
)
inline

Creates a UAO computation over a borrowed valued tree.

The valued tree is borrowed; it must outlive this object.

Parameters
valuedTreeValued tree whose topology and altitude define the reconstruction domain.
attrs_increasingNon-null increasing-attribute buffer indexed by dense internal NodeId.

Definition at line 328 of file UltimateAttributeOpening.hpp.

Member Function Documentation

◆ execute() [1/2]

template<AltitudeValue T, std::floating_point Real = float>
void mmcfilters::UltimateAttributeOpening< T, Real >::execute ( Real  maximumAttributeThreshold)
inline

Executes UAO using all internal tree nodes as selectable candidates.

Parameters
maximumAttributeThresholdMaximum increasing-attribute threshold considered by the UAO traversal.
Exceptions
std::logic_errorIf the tree topology changed after construction.

Definition at line 346 of file UltimateAttributeOpening.hpp.

◆ execute() [2/2]

template<AltitudeValue T, std::floating_point Real = float>
void mmcfilters::UltimateAttributeOpening< T, Real >::execute ( Real  maximumAttributeThreshold,
const std::vector< uint8_t > &  selectedForFiltering 
)
inline

Executes UAO with an explicit node-selection mask.

Parameters
maximumAttributeThresholdMaximum increasing-attribute threshold considered by the UAO traversal.
selectedForFilteringDense internal-node mask marking selectable primitive nodes.
Exceptions
std::invalid_argumentIf selectedForFiltering does not match the internal node slot count.
std::logic_errorIf the tree topology changed after construction.

Definition at line 363 of file UltimateAttributeOpening.hpp.

◆ executeWithDepthStability()

template<AltitudeValue T, std::floating_point Real = float>
void mmcfilters::UltimateAttributeOpening< T, Real >::executeWithDepthStability ( Real  maximumAttributeThreshold,
int  depthWindowRadius 
)
inline

Executes UAO with a depth-stability node-selection mask.

Parameters
maximumAttributeThresholdMaximum increasing-attribute threshold considered by the UAO traversal.
depthWindowRadiusPositive number of tree edges used to build the stability window. Altitude is not read by the stability selection.
Exceptions
std::invalid_argumentIf depthWindowRadius is not positive.
std::logic_errorIf the tree topology changed after construction.

Definition at line 401 of file UltimateAttributeOpening.hpp.

◆ executeWithMSER()

template<AltitudeValue T, std::floating_point Real = float>
void mmcfilters::UltimateAttributeOpening< T, Real >::executeWithMSER ( Real  maximumAttributeThreshold,
AltitudeDifference< T >  altitudeWindowRadius 
)
inline

Executes UAO with an MSER-derived node-selection mask.

Parameters
maximumAttributeThresholdMaximum increasing-attribute threshold considered by the UAO traversal.
altitudeWindowRadiusRadius of the altitude-based stability window.
Exceptions
std::logic_errorIf this object was constructed from a view rather than a valued tree owner, or if the tree topology changed after construction.

Definition at line 381 of file UltimateAttributeOpening.hpp.

◆ getAssociatedColorImage()

template<AltitudeValue T, std::floating_point Real = float>
ImageUInt8Ptr mmcfilters::UltimateAttributeOpening< T, Real >::getAssociatedColorImage ( ) const
inline

Returns a color rendering of the associated-index image.

Returns
RGB-like color image produced from getAssociatedImage().
Exceptions
std::logic_errorIf the tree topology changed after construction.

Definition at line 449 of file UltimateAttributeOpening.hpp.

◆ getAssociatedImage()

template<AltitudeValue T, std::floating_point Real = float>
ImageInt32Ptr mmcfilters::UltimateAttributeOpening< T, Real >::getAssociatedImage ( ) const
inline

Returns the per-pixel associated attribute-index image.

Returns
Signed integer image on the original image domain.
Exceptions
std::logic_errorIf the tree topology changed after construction.

Definition at line 431 of file UltimateAttributeOpening.hpp.

◆ getMaxContrastImage()

template<AltitudeValue T, std::floating_point Real = float>
ImagePtr< T > mmcfilters::UltimateAttributeOpening< T, Real >::getMaxContrastImage ( ) const
inline

Returns the per-pixel maximum UAO contrast image.

Returns
Image on the original image domain using altitude type T.
Exceptions
std::logic_errorIf the tree topology changed after construction.

Definition at line 413 of file UltimateAttributeOpening.hpp.


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