MorphologicalAttributeFilters
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 criteria.
 

Public Member Functions

 UltimateAttributeOpening (const AltitudeView &view, const std::shared_ptr< Real[]> &attrs_increasing)
 Creates a UAO computation over a non-owning weighted view.
 
 UltimateAttributeOpening (const AltitudeView &view, const std::vector< Real > &attrs_increasing)
 Creates a UAO computation over a non-owning weighted view.
 
 UltimateAttributeOpening (const AltitudeView &view, const Real *attrs_increasing)
 Creates a UAO computation over a non-owning weighted view.
 
 UltimateAttributeOpening (const WeightedMorphologicalTree< T > &weighted, const std::shared_ptr< Real[]> &attrs_increasing)
 Creates a UAO computation over a borrowed weighted tree.
 
 UltimateAttributeOpening (const WeightedMorphologicalTree< T > &weighted, const std::vector< Real > &attrs_increasing)
 Creates a UAO computation over a borrowed weighted tree.
 
 UltimateAttributeOpening (const WeightedMorphologicalTree< T > &weighted, const Real *attrs_increasing)
 Creates a UAO computation over a borrowed weighted tree.
 
void execute (Real maxCriterion)
 Executes UAO using all internal tree nodes as selectable candidates.
 
void execute (Real maxCriterion, const std::vector< uint8_t > &selectedForFiltering)
 Executes UAO with an explicit node-selection mask.
 
void executeWithMSER (Real maxCriterion, AltitudeDiff< T > deltaMSER)
 Executes UAO with an MSER-derived node-selection mask.
 
void executeWithDepthStability (Real maxCriterion, int depthDelta)
 Executes UAO with a depth-stability node-selection mask.
 
ImagePtr< TgetMaxContrastImage () 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 weighted-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 weighted tree or weighted view.
RealAttribute-buffer floating-point type.

Definition at line 37 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 criteria.

Definition at line 40 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 weighted view.

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

Definition at line 181 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 weighted view.

Parameters
viewWeighted 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 196 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 weighted view.

Parameters
viewWeighted 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 209 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [4/6]

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

Creates a UAO computation over a borrowed weighted tree.

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

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

Definition at line 231 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [5/6]

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

Creates a UAO computation over a borrowed weighted tree.

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

Parameters
weightedWeighted 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 248 of file UltimateAttributeOpening.hpp.

◆ UltimateAttributeOpening() [6/6]

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

Creates a UAO computation over a borrowed weighted tree.

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

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

Definition at line 263 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  maxCriterion)
inline

Executes UAO using all internal tree nodes as selectable candidates.

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

Definition at line 278 of file UltimateAttributeOpening.hpp.

◆ execute() [2/2]

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

Executes UAO with an explicit node-selection mask.

Parameters
maxCriterionMaximum 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 295 of file UltimateAttributeOpening.hpp.

◆ executeWithDepthStability()

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

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

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

Definition at line 333 of file UltimateAttributeOpening.hpp.

◆ executeWithMSER()

template<AltitudeValue T, std::floating_point Real = float>
void mmcfilters::UltimateAttributeOpening< T, Real >::executeWithMSER ( Real  maxCriterion,
AltitudeDiff< T deltaMSER 
)
inline

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

Parameters
maxCriterionMaximum increasing-attribute threshold considered by the UAO traversal.
deltaMSERAltitude delta used to compute the MSER stability mask.
Exceptions
std::logic_errorIf this object was constructed from a view rather than a weighted tree owner, or if the tree topology changed after construction.

Definition at line 313 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 382 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 364 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 346 of file UltimateAttributeOpening.hpp.


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