MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
mmcfilters::WeightedTreeEditor< T > Class Template Reference

Edit-session facade for WeightedMorphologicalTree. More...

#include <WeightedMorphologicalTree.hpp>

Public Member Functions

NodeId createDetachedNode (T altitude=T{})
 Creates a detached topology node and initializes its altitude.
 
void setNodeAltitude (NodeId nodeId, T altitude)
 Sets a live node altitude during a staged topology edit.
 
void detach (NodeId nodeId)
 Detaches one non-root node through the structural editor.
 
void reparent (NodeId nodeId, NodeId newParentId)
 Reparents one node through the structural editor.
 
void attach (NodeId parentId, NodeId detachedNodeId)
 Attaches one detached node through the structural editor.
 
void moveChildren (NodeId parentId, NodeId sourceId)
 Moves all direct children from sourceId under parentId.
 
void moveProperPart (NodeId targetNodeId, NodeId sourceNodeId, NodeId properPartId)
 Moves one direct proper part between nodes.
 
void moveProperParts (NodeId targetNodeId, NodeId sourceNodeId)
 Moves all direct proper parts between nodes.
 
void removeChild (NodeId parentNodeId, NodeId childId, bool releaseNodeFlag)
 Detaches a direct child and optionally releases an empty node slot.
 
void releaseNode (NodeId nodeId)
 Releases an empty detached node slot.
 
void setRoot (NodeId nodeId)
 Promotes one node to the topology root.
 
void pruneNode (NodeId nodeId)
 Applies the topology prune helper inside the weighted edit session.
 
void mergeNodeIntoParent (NodeId nodeId)
 Applies the topology merge helper inside the weighted edit session.
 
bool hasDetachedAliveNodes () const noexcept
 Returns whether the structural edit still has detached live nodes.
 
TreeValidationResult validate () const noexcept
 Validates only the staged topology.
 
TreeValidationResult validateAndCommit () noexcept
 Validates topology, validates altitude order, then closes the edit.
 
void commit ()
 Exception-based wrapper around validateAndCommit().
 
void commitUnchecked () noexcept
 Closes the weighted edit without topology or altitude validation.
 

Friends

class WeightedMorphologicalTree< T >
 

Detailed Description

template<AltitudeValue T>
class mmcfilters::WeightedTreeEditor< T >

Edit-session facade for WeightedMorphologicalTree.

The weighted editor reuses the structural TreeEditor for topology while keeping the external altitude buffer as the canonical weighted state. commit() first validates the topology and then validates monotone altitude.

Definition at line 419 of file WeightedMorphologicalTree.hpp.

Member Function Documentation

◆ attach()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::attach ( NodeId  parentId,
NodeId  detachedNodeId 
)
inline

Attaches one detached node through the structural editor.

Definition at line 481 of file WeightedMorphologicalTree.hpp.

◆ commit()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::commit ( )
inline

Exception-based wrapper around validateAndCommit().

Definition at line 579 of file WeightedMorphologicalTree.hpp.

◆ commitUnchecked()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::commitUnchecked ( )
inlinenoexcept

Closes the weighted edit without topology or altitude validation.

Definition at line 589 of file WeightedMorphologicalTree.hpp.

◆ createDetachedNode()

template<AltitudeValue T>
NodeId mmcfilters::WeightedTreeEditor< T >::createDetachedNode ( T  altitude = T{})
inline

Creates a detached topology node and initializes its altitude.

The altitude buffer is reserved before mutating the topology so allocation failure cannot leave a new node without a matching altitude slot.

Definition at line 439 of file WeightedMorphologicalTree.hpp.

◆ detach()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::detach ( NodeId  nodeId)
inline

Detaches one non-root node through the structural editor.

Definition at line 467 of file WeightedMorphologicalTree.hpp.

◆ hasDetachedAliveNodes()

template<AltitudeValue T>
bool mmcfilters::WeightedTreeEditor< T >::hasDetachedAliveNodes ( ) const
inlinenoexcept

Returns whether the structural edit still has detached live nodes.

Definition at line 544 of file WeightedMorphologicalTree.hpp.

◆ mergeNodeIntoParent()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::mergeNodeIntoParent ( NodeId  nodeId)
inline

Applies the topology merge helper inside the weighted edit session.

Definition at line 537 of file WeightedMorphologicalTree.hpp.

◆ moveChildren()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::moveChildren ( NodeId  parentId,
NodeId  sourceId 
)
inline

Moves all direct children from sourceId under parentId.

Definition at line 488 of file WeightedMorphologicalTree.hpp.

◆ moveProperPart()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::moveProperPart ( NodeId  targetNodeId,
NodeId  sourceNodeId,
NodeId  properPartId 
)
inline

Moves one direct proper part between nodes.

Definition at line 495 of file WeightedMorphologicalTree.hpp.

◆ moveProperParts()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::moveProperParts ( NodeId  targetNodeId,
NodeId  sourceNodeId 
)
inline

Moves all direct proper parts between nodes.

Definition at line 502 of file WeightedMorphologicalTree.hpp.

◆ pruneNode()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::pruneNode ( NodeId  nodeId)
inline

Applies the topology prune helper inside the weighted edit session.

Definition at line 530 of file WeightedMorphologicalTree.hpp.

◆ releaseNode()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::releaseNode ( NodeId  nodeId)
inline

Releases an empty detached node slot.

Definition at line 516 of file WeightedMorphologicalTree.hpp.

◆ removeChild()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::removeChild ( NodeId  parentNodeId,
NodeId  childId,
bool  releaseNodeFlag 
)
inline

Detaches a direct child and optionally releases an empty node slot.

Definition at line 509 of file WeightedMorphologicalTree.hpp.

◆ reparent()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::reparent ( NodeId  nodeId,
NodeId  newParentId 
)
inline

Reparents one node through the structural editor.

Definition at line 474 of file WeightedMorphologicalTree.hpp.

◆ setNodeAltitude()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::setNodeAltitude ( NodeId  nodeId,
T  altitude 
)
inline

Sets a live node altitude during a staged topology edit.

Monotone order is intentionally checked at weighted commit time because intermediate staged topologies may not yet have final parent/child relations.

Definition at line 456 of file WeightedMorphologicalTree.hpp.

◆ setRoot()

template<AltitudeValue T>
void mmcfilters::WeightedTreeEditor< T >::setRoot ( NodeId  nodeId)
inline

Promotes one node to the topology root.

Definition at line 523 of file WeightedMorphologicalTree.hpp.

◆ validate()

template<AltitudeValue T>
TreeValidationResult mmcfilters::WeightedTreeEditor< T >::validate ( ) const
inlinenoexcept

Validates only the staged topology.

Altitude monotonicity is checked by validateAndCommit() / commit().

Definition at line 553 of file WeightedMorphologicalTree.hpp.

◆ validateAndCommit()

template<AltitudeValue T>
TreeValidationResult mmcfilters::WeightedTreeEditor< T >::validateAndCommit ( )
inlinenoexcept

Validates topology, validates altitude order, then closes the edit.

Definition at line 560 of file WeightedMorphologicalTree.hpp.

Friends And Related Symbol Documentation

◆ WeightedMorphologicalTree< T >

template<AltitudeValue T>
friend class WeightedMorphologicalTree< T >
friend

Definition at line 406 of file WeightedMorphologicalTree.hpp.


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