mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
mmcfilters::ContourTrace Class Reference

Independently owned ordered contour trace for one tree node. More...

#include <ContourTrace.hpp>

Public Member Functions

 ContourTrace (ContourTraceView trace)
 Copies a borrowed trace so it can outlive its source traversal.
 
std::span< const ContourBoundaryboundaries () const noexcept
 Returns all ordered boundary descriptors.
 
ContourBoundary externalBoundary () const
 Returns the unique external boundary.
 
ContourEdgeRange edges () const noexcept
 Returns every contour edge in boundary order.
 
ContourEdgeRange boundaryEdges (const ContourBoundary &boundary) const
 Returns the ordered edges of one boundary.
 
ContourPixelRange boundaryPixels (const ContourBoundary &boundary) const
 Returns one support pixel for each ordered boundary edge.
 
ContourTraceView view () const noexcept
 Returns a borrowed view over this owned trace.
 

Friends

class ContourTraceComputation
 

Detailed Description

Independently owned ordered contour trace for one tree node.

Returned views, spans, and ranges borrow this trace's storage. Keep that storage alive and unchanged while using them; replacing it by assignment or destroying it invalidates those borrowed objects.

Definition at line 336 of file ContourTrace.hpp.

Constructor & Destructor Documentation

◆ ContourTrace()

mmcfilters::ContourTrace::ContourTrace ( ContourTraceView  trace)
inlineexplicit

Copies a borrowed trace so it can outlive its source traversal.

Parameters
traceBorrowed source trace.

Definition at line 344 of file ContourTrace.hpp.

Member Function Documentation

◆ boundaries()

std::span< const ContourBoundary > mmcfilters::ContourTrace::boundaries ( ) const
inlinenoexcept

Returns all ordered boundary descriptors.

Returns
Borrowed boundary descriptor span.

Definition at line 349 of file ContourTrace.hpp.

◆ boundaryEdges()

ContourEdgeRange mmcfilters::ContourTrace::boundaryEdges ( const ContourBoundary boundary) const
inline

Returns the ordered edges of one boundary.

Parameters
boundaryBoundary descriptor from this trace.
Returns
Ordered edge range selected by the descriptor.

Definition at line 366 of file ContourTrace.hpp.

◆ boundaryPixels()

ContourPixelRange mmcfilters::ContourTrace::boundaryPixels ( const ContourBoundary boundary) const
inline

Returns one support pixel for each ordered boundary edge.

Parameters
boundaryBoundary descriptor from this trace.
Returns
Ordered support-pixel projection, including repetitions.

Definition at line 373 of file ContourTrace.hpp.

◆ edges()

ContourEdgeRange mmcfilters::ContourTrace::edges ( ) const
inlinenoexcept

Returns every contour edge in boundary order.

Returns
Ordered edge range.

Definition at line 359 of file ContourTrace.hpp.

◆ externalBoundary()

ContourBoundary mmcfilters::ContourTrace::externalBoundary ( ) const
inline

Returns the unique external boundary.

Returns
Unique external boundary descriptor.
Exceptions
std::logic_errorIf zero or multiple external boundaries exist.

Definition at line 356 of file ContourTrace.hpp.

◆ view()

ContourTraceView mmcfilters::ContourTrace::view ( ) const
inlinenoexcept

Returns a borrowed view over this owned trace.

Returns
View borrowing the current edge and boundary storage. Replacing or destroying that storage invalidates the view and its spans and ranges.

Definition at line 380 of file ContourTrace.hpp.

Friends And Related Symbol Documentation

◆ ContourTraceComputation

Definition at line 383 of file ContourTrace.hpp.


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