|
mmcfilters
Public API documentation
|
Family of attribute-based image filtering operators on morphological trees. More...
#include <AttributeFilters.hpp>
Public Member Functions | |
| 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. | |
| ImagePtr< T > | filteringByPruningMin (const NodePreservationMask &nodePreservationMask) |
| Applies pruning-min filtering from a dense node-preservation mask. | |
| ImagePtr< T > | filteringByPruningMax (const NodePreservationMask &nodePreservationMask) |
| Applies pruning-max filtering from a dense node-preservation mask. | |
Static Public Member Functions | |
| static void | filteringByPruningMin (const ValuedMorphologicalTreeView< T > &valuedTree, const NodePreservationMask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| Writes pruning-min filtering from a node-preservation mask into an output image. | |
| static void | filteringByPruningMin (const ValuedMorphologicalTree< T > &valuedTree, const NodePreservationMask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| Writes pruning-min filtering from a valued-tree owner into an output image. | |
| static void | filteringByPruningMax (const ValuedMorphologicalTreeView< T > &valuedTree, const NodePreservationMask &nodePreservationMask, ImagePtr< T > imgOutputPtr) |
| Writes pruning-max filtering from a node-preservation mask into an output image. | |
| static void | filteringByPruningMax (const ValuedMorphologicalTree< T > &valuedTree, const NodePreservationMask &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. | |
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:
NodeId slot domain, not by exported Higra ids;numInternalNodeSlots() entries; raw and shared attribute pointers must provide at least that many readable entries. Their length cannot be checked by these overloads;properPart(node) contains only the pixels owned directly by that node;NodeId slot order is not a topological order after Higra import or structural edits;Reconstruction rule summary:
Pruning-min accepts a node when its attribute is greater than the threshold; pruning-max marks a node as rejected when its attribute is less than or equal to the threshold. 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.
|
inlineexplicit |
Creates filtering operators over a non-owning valued tree view.
The view must remain valid for the lifetime of the filter object. Public methods reject use after the underlying topology mutates.
| view | Tree view. |
Definition at line 372 of file AttributeFilters.hpp.
|
inlineexplicit |
Creates filtering operators over an owned valued tree.
This overload keeps a pointer to the owner so methods that require tree-owned altitude state, such as MSER-assisted preservation selection, can be used.
| valuedTree | Valued tree. |
Definition at line 385 of file AttributeFilters.hpp.
|
inline |
Applies pruning-max filtering from a dense node-preservation mask.
| nodePreservationMask | Decisions indexed by internal NodeId, with exactly numInternalNodeSlots() entries; true accepts a node. |
Definition at line 492 of file AttributeFilters.hpp.
|
inline |
Applies pruning-max filtering from a raw internal-node attribute buffer.
| attr | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
Definition at line 445 of file AttributeFilters.hpp.
|
inline |
Applies pruning-max filtering from an attribute buffer.
Nodes with attribute values above threshold are kept, and fully rejected subtrees are reconstructed at their own subtree levels.
| attr | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
Definition at line 433 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-max filtering from a valued-tree owner into an output image.
| valuedTree | Valued tree. |
| nodePreservationMask | Decisions indexed by internal NodeId, with exactly numInternalNodeSlots() entries; true accepts a node. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 545 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-max filtering from a valued-tree owner and raw attribute buffer.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 660 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-max filtering from a valued-tree owner and owned attribute buffer.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 631 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-max filtering from a node-preservation mask into an output image.
| valuedTree | Valued tree. |
| nodePreservationMask | Decisions indexed by internal NodeId, with exactly numInternalNodeSlots() entries; true accepts a node. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 532 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-max filtering from a raw attribute buffer into an output image.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 646 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-max filtering from an owned attribute buffer into an output image.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 617 of file AttributeFilters.hpp.
|
inline |
Applies pruning-min filtering from a dense node-preservation mask.
| nodePreservationMask | Decisions indexed by internal NodeId, with exactly numInternalNodeSlots() entries; true accepts a node. |
Definition at line 479 of file AttributeFilters.hpp.
|
inline |
Applies pruning-min filtering from a raw internal-node attribute buffer.
| attr | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
Definition at line 416 of file AttributeFilters.hpp.
|
inline |
Applies pruning-min filtering from an attribute buffer.
Nodes with attribute values above threshold remain traversable; rejected subtrees are reconstructed at the ancestor level selected by the pruning-min rule.
| attr | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
Definition at line 404 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-min filtering from a valued-tree owner into an output image.
| valuedTree | Valued tree. |
| nodePreservationMask | Decisions indexed by internal NodeId, with exactly numInternalNodeSlots() entries; true accepts a node. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 519 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-min filtering from a valued-tree owner and raw attribute buffer.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 603 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-min filtering from a valued-tree owner and owned attribute buffer.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 574 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-min filtering from a node-preservation mask into an output image.
| valuedTree | Valued tree. |
| nodePreservationMask | Decisions indexed by internal NodeId, with exactly numInternalNodeSlots() entries; true accepts a node. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 506 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-min filtering from a raw attribute buffer into an output image.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 589 of file AttributeFilters.hpp.
|
inlinestatic |
Writes pruning-min filtering from an owned attribute buffer into an output image.
| valuedTree | Valued tree. |
| attribute | Non-null attribute buffer indexed by internal NodeId, with at least numInternalNodeSlots() readable entries. |
| threshold | Pruning cutoff; values equal to it are rejected. |
| imgOutputPtr | Non-null output image with the tree's grid dimensions. |
Definition at line 560 of file AttributeFilters.hpp.
|
inline |
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.
| attr | Attribute requested by the operation. |
| threshold | Threshold applied by the operation. |
Definition at line 465 of file AttributeFilters.hpp.