|
| | AttributeFilters (AltitudeView view) |
| | Creates filtering operators over a non-owning valued tree view.
|
| | AttributeFilters (const ValuedMorphologicalTree< T > &valuedTree) |
| | Creates filtering operators over an owned valued tree.
|
|
| ~AttributeFilters ()=default |
| | Destroys the attribute-filter facade.
|
| template<std::floating_point Real> |
| ImagePtr< T > | filteringByPruningMin (const std::shared_ptr< Real[]> &attr, Real threshold) |
| | Applies pruning-min filtering from an attribute buffer.
|
| template<std::floating_point Real> |
| ImagePtr< T > | filteringByPruningMin (const Real *attr, Real threshold) |
| | Applies pruning-min filtering from a raw internal-node attribute buffer.
|
| template<std::floating_point Real> |
| ImagePtr< T > | filteringByPruningMax (const std::shared_ptr< Real[]> &attr, Real threshold) |
| | Applies pruning-max filtering from an attribute buffer.
|
| template<std::floating_point Real> |
| ImagePtr< T > | filteringByPruningMax (const Real *attr, Real threshold) |
| | Applies pruning-max filtering from a raw internal-node attribute buffer.
|
| template<std::floating_point Real> |
| ImagePtr< T > | filteringByViterbiRule (const Real *attr, Real threshold) |
| | Applies Salembier-style Viterbi filtering from a raw attribute buffer.
|
| template<detail::NodePreservationDecisions Mask> |
| ImagePtr< T > | filteringByPruningMin (const Mask &nodePreservationMask) |
| | Applies pruning-min filtering from a dense node-preservation mask.
|
| template<detail::NodePreservationDecisions Mask> |
| ImagePtr< T > | filteringByPruningMax (const Mask &nodePreservationMask) |
| | Applies pruning-max filtering from a dense node-preservation mask.
|
|
| template<detail::NodePreservationDecisions Mask> |
| static void | filteringByPruningMin (const ValuedMorphologicalTreeView< T > &valuedTree, const Mask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-min filtering from a node-preservation mask into an output image.
|
| template<detail::NodePreservationDecisions Mask> |
| static void | filteringByPruningMin (const ValuedMorphologicalTree< T > &valuedTree, const Mask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-min filtering from a valued-tree owner into an output image.
|
| template<detail::NodePreservationDecisions Mask> |
| static void | filteringByPruningMax (const ValuedMorphologicalTreeView< T > &valuedTree, const Mask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-max filtering from a node-preservation mask into an output image.
|
| template<detail::NodePreservationDecisions Mask> |
| static void | filteringByPruningMax (const ValuedMorphologicalTree< T > &valuedTree, const Mask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-max filtering from a valued-tree owner into an output image.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMin (const ValuedMorphologicalTreeView< T > &valuedTree, const std::shared_ptr< Real[]> &attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-min filtering from an owned attribute buffer into an output image.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMin (const ValuedMorphologicalTree< T > &valuedTree, const std::shared_ptr< Real[]> &attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-min filtering from a valued-tree owner and owned attribute buffer.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMin (const ValuedMorphologicalTreeView< T > &valuedTree, const Real *attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-min filtering from a raw attribute buffer into an output image.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMin (const ValuedMorphologicalTree< T > &valuedTree, const Real *attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-min filtering from a valued-tree owner and raw attribute buffer.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMax (const ValuedMorphologicalTreeView< T > &valuedTree, const std::shared_ptr< Real[]> &attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-max filtering from an owned attribute buffer into an output image.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMax (const ValuedMorphologicalTree< T > &valuedTree, const std::shared_ptr< Real[]> &attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-max filtering from a valued-tree owner and owned attribute buffer.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMax (const ValuedMorphologicalTreeView< T > &valuedTree, const Real *attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-max filtering from a raw attribute buffer into an output image.
|
| template<std::floating_point Real> |
| static void | filteringByPruningMax (const ValuedMorphologicalTree< T > &valuedTree, const Real *attribute, Real threshold, ImagePtr< T > imgOutputPtr) |
| | Writes pruning-max filtering from a valued-tree owner and raw attribute buffer.
|
template<AltitudeValue T>
class mmcfilters::AttributeFilters< T >
Family of attribute-based image filtering operators on morphological trees.
AttributeFilters groups pruning, Viterbi, and extinction-related operations. Direct and subtractive reconstruction are exposed separately by DirectAttributeFilter, SubtractiveAttributeFilter, and SoftSubtractiveAttributeFilter. The operators consume preservation masks or attribute buffers defined on dense node ids and reconstruct pixel images.
Contract and node-domain assumptions:
- every preservation mask, score, and attribute buffer is indexed by the dense internal NodeId slot domain, not by exported Higra ids;
- only alive nodes are reconstructed, but buffers must still cover every internal slot so callers can reuse the tree-wide attribute layout;
- preservation masks contain exactly numInternalNodeSlots() entries; raw and shared attribute pointers must provide at least that many readable entries. Their length cannot be checked by these overloads;
- output pixels are written through direct smallest-node mapping. A node represents the support of its full subtree, while properPart(node) contains only the pixels owned directly by that node;
- propagation rules are evaluated in explicit root-to-leaf order because the dense NodeId slot order is not a topological order after Higra import or structural edits;
- public object methods snapshot the topology mutation version at construction and reject use after the tree structure changes.
Reconstruction rule summary:
- Viterbi rule: a dynamic program chooses a connected preserved set from threshold-derived preserve/remove costs, then reconstructs it with the direct rule;
- pruning-min rule: rejected branches are cut immediately and their whole subtree is painted at the current accepted ancestor level;
- pruning-max rule: only subtrees whose nodes are all rejected are cut, and such subtrees are painted at the rejected subtree root level.
Pruning-min accepts a node when its attribute is greater than or equal to the threshold; pruning-max marks a node as rejected when its attribute is less than the threshold. This is the same inclusive rule used by computeNodePreservationMask. Both rules always visit the root. Each visited node writes its own altitude to its proper part; a collapsed subtree receives the altitude selected by the rule above. Returned images own their storage and have the tree's grid dimensions. Overloads taking an output image require those same dimensions and write into the supplied storage.
Definition at line 70 of file AttributeFilters.hpp.
template<AltitudeValue T>
template<std::floating_point Real>
Applies Salembier-style Viterbi filtering from a raw attribute buffer.
The internal detail implementation turns attr and threshold into preserve/remove costs and solves the optimal connected keep mask on the tree. The root is always preserved. Once the Viterbi path removes a node, every descendant is removed as well; preserved descendants can only appear below preserved ancestors. The final image is reconstructed by the direct rule using that connected node-preservation mask.
- Parameters
-
| attr | Attribute requested by the operation. |
| threshold | Threshold applied by the operation. |
- Returns
- Image produced by the operation.
Definition at line 468 of file AttributeFilters.hpp.