|
MorphologicalAttributeFilters
Public API documentation
|
Computes and stores extinction values for regional extrema. More...
#include <ExtinctionValues.hpp>
Public Member Functions | |
| ExtinctionValues (const AltitudeView &view, const std::shared_ptr< Real[]> &attr) | |
| Computes extinction values from a weighted view and shared attribute buffer. | |
| ExtinctionValues (const AltitudeView &view, const std::vector< Real > &attr) | |
| Computes extinction values from a weighted view and vector attribute buffer. | |
| ExtinctionValues (const AltitudeView &view, const Real *attr) | |
| Computes extinction values from a weighted view and raw attribute buffer. | |
| ExtinctionValues (const WeightedMorphologicalTree< T > &weighted, const std::shared_ptr< Real[]> &attr) | |
| Computes extinction values from a weighted tree and shared attribute buffer. | |
| ExtinctionValues (const WeightedMorphologicalTree< T > &weighted, const std::vector< Real > &attr) | |
| Computes extinction values from a weighted tree and vector attribute buffer. | |
| ExtinctionValues (const WeightedMorphologicalTree< T > &weighted, const Real *attr) | |
| Computes extinction values from a weighted tree and raw attribute buffer. | |
| ImagePtr< Real > | saliencyMap (int extremaToKeep, bool unweighted=true) |
| Builds a contour saliency image from the strongest extrema. | |
| ImagePtr< T > | filtering (int extremaToKeep) |
| Reconstructs an image by keeping the strongest extrema. | |
| std::vector< RegionalExtremaNode< Real > > & | getExtinctionValues () |
| Returns the extinction records sorted by decreasing extinction. | |
Computes and stores extinction values for regional extrema.
ExtinctionValues implements the classical leaf-extrema extinction ranking for max-trees and min-trees. In this component-tree setting, the regional extrema processed by the algorithm are the tree leaves. The supplied scalar attribute is indexed by dense internal NodeId, must have one value for every internal node slot, and is interpreted so that larger values represent stronger extrema. Results are sorted in decreasing extinction order and can be consumed either as records, a filtered reconstruction, or a contour saliency map.
The strongest extremum has no stronger merge point. Its extinction value is represented by the explicit finite sentinel numeric_limits<Real>::max().
Trees of shapes and self-dual residual trees are intentionally rejected by the public constructors because their complete regional-extrema set is not generally equivalent to tree.getLeaves().
The object records the tree mutation version at construction time. Public operations reject use after the underlying topology changes.
| T | Altitude type used by the weighted tree or weighted view. |
| Real | Attribute-buffer floating-point type. |
Definition at line 75 of file ExtinctionValues.hpp.
|
inline |
Computes extinction values from a weighted view and shared attribute buffer.
| view | Weighted tree view whose topology and altitude define the reconstruction domain. |
| attr | Shared buffer with one scalar attribute value per internal node slot. |
Definition at line 180 of file ExtinctionValues.hpp.
|
inline |
Computes extinction values from a weighted view and vector attribute buffer.
| std::invalid_argument | If attr does not match the internal node slot count of view.topology(). |
Definition at line 189 of file ExtinctionValues.hpp.
|
inline |
Computes extinction values from a weighted view and raw attribute buffer.
| view | Weighted tree view whose topology and altitude define the reconstruction domain. |
| attr | Non-null buffer indexed by dense internal NodeId. |
| std::invalid_argument | If attr is null or if the view topology is stale. |
Definition at line 200 of file ExtinctionValues.hpp.
|
inline |
Computes extinction values from a weighted tree and shared attribute buffer.
The weighted tree is borrowed; it must outlive this object.
Definition at line 214 of file ExtinctionValues.hpp.
|
inline |
Computes extinction values from a weighted tree and vector attribute buffer.
The weighted tree is borrowed; it must outlive this object.
| std::invalid_argument | If attr does not match the internal node slot count of the tree. |
Definition at line 227 of file ExtinctionValues.hpp.
|
inline |
Computes extinction values from a weighted tree and raw attribute buffer.
The weighted tree is borrowed; it must outlive this object.
| weighted | Weighted tree whose topology and altitude define the reconstruction domain. |
| attr | Non-null buffer indexed by dense internal NodeId. |
Definition at line 241 of file ExtinctionValues.hpp.
|
inline |
Reconstructs an image by keeping the strongest extrema.
| extremaToKeep | Maximum number of leaf extrema retained from the descending extinction ranking. |
T. | std::logic_error | If the tree topology changed after construction. |
Definition at line 293 of file ExtinctionValues.hpp.
|
inline |
Returns the extinction records sorted by decreasing extinction.
| std::logic_error | If the tree topology changed after construction. |
Definition at line 340 of file ExtinctionValues.hpp.
|
inline |
Builds a contour saliency image from the strongest extrema.
| extremaToKeep | Maximum number of extrema retained from the descending extinction ranking. |
| unweighted | When true, contours receive rank-like scores; when false, contours receive their extinction values. |
| std::logic_error | If the tree topology changed after construction. |
Definition at line 256 of file ExtinctionValues.hpp.