MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
mmcfilters::sdrt::SpatialOrder Class Reference

Total order over the pixels of one construction domain. More...

#include <ResidualEvolution.hpp>

Inheritance diagram for mmcfilters::sdrt::SpatialOrder:
Inheritance graph
[legend]

Public Member Functions

 SpatialOrder (std::vector< PixelId > pixelsInOrder)
 Creates an explicit total spatial order.
 
bool isRowMajor () const noexcept
 Returns whether the order uses implicit row-major ranks.
 
void validateDomainSize (std::size_t numPixels) const
 Validates that this order covers a construction domain.
 
bool precedes (PixelId lhs, PixelId rhs) const
 Returns whether lhs precedes rhs.
 
PixelId spatialMinimum (std::span< const PixelId > support) const
 Returns the least pixel of a non-empty support.
 

Protected Member Functions

 SpatialOrder ()=default
 Creates the implicit row-major order.
 

Detailed Description

Total order over the pixels of one construction domain.

An explicit order is represented by a permutation of all pixel identifiers. The default row-major specialization avoids storing that permutation and uses the dense pixel identifier itself as its rank.

Definition at line 31 of file ResidualEvolution.hpp.

Constructor & Destructor Documentation

◆ SpatialOrder()

mmcfilters::sdrt::SpatialOrder::SpatialOrder ( std::vector< PixelId pixelsInOrder)
inlineexplicit

Creates an explicit total spatial order.

Parameters
pixelsInOrderPixel identifiers from first to last.
Exceptions
std::invalid_argumentif the sequence is not a permutation of [0,n).

Definition at line 38 of file ResidualEvolution.hpp.

Member Function Documentation

◆ isRowMajor()

bool mmcfilters::sdrt::SpatialOrder::isRowMajor ( ) const
inlinenoexcept

Returns whether the order uses implicit row-major ranks.

Returns
true for the implicit row-major order.

Definition at line 57 of file ResidualEvolution.hpp.

◆ precedes()

bool mmcfilters::sdrt::SpatialOrder::precedes ( PixelId  lhs,
PixelId  rhs 
) const
inline

Returns whether lhs precedes rhs.

Parameters
lhsFirst pixel.
rhsSecond pixel.
Returns
true when lhs has a lower spatial rank than rhs.

Definition at line 75 of file ResidualEvolution.hpp.

◆ spatialMinimum()

PixelId mmcfilters::sdrt::SpatialOrder::spatialMinimum ( std::span< const PixelId support) const
inline

Returns the least pixel of a non-empty support.

Parameters
supportPixel support whose spatial minimum is requested.
Returns
Pixel of support with the lowest configured spatial rank.

Definition at line 84 of file ResidualEvolution.hpp.

◆ validateDomainSize()

void mmcfilters::sdrt::SpatialOrder::validateDomainSize ( std::size_t  numPixels) const
inline

Validates that this order covers a construction domain.

Parameters
numPixelsNumber of pixels in the domain.

Definition at line 63 of file ResidualEvolution.hpp.


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