PCL
pcl::ThreeWayStructure Class Reference

Standard three-way structure. More...

#include <StructuringElement.h>

+ Inheritance diagram for pcl::ThreeWayStructure:

Public Member Functions

 ThreeWayStructure (const ThreeWayStructure &)=default
 
 ThreeWayStructure (int size)
 
StructuringElementClone () const override
 
bool ElementExists (int i, int j, int k) const override
 
bool IsBox (int k) const override
 
- Public Member Functions inherited from pcl::StructuringElement
 StructuringElement (const StructuringElement &x)
 
 StructuringElement (int size=3, int n=1)
 
virtual ~StructuringElement ()
 
void Initialize () const
 
bool IsReflected () const
 
int NumberOfElements () const
 
int NumberOfWays () const
 
StructuringElementoperator= (const StructuringElement &x)
 
template<typename T >
void PeekElements (T *h1, int &nh1, const T *h, int k) const
 
void Reflect ()
 
int Size () const
 

Additional Inherited Members

- Public Types inherited from pcl::StructuringElement
using existence_mask = GenericVector< existence_mask_element >
 
using existence_mask_count = GenericVector< int >
 
using existence_mask_element = uint32
 
using existence_mask_set = GenericVector< existence_mask >
 

Detailed Description

The standard three-way structure of size 5 is defined as follows:

  Way #0       Way #1       Way #2

· · x · ·    x · · · x    · · · · ·
· · x · ·    · x · x ·    · · · · ·
x x · x x    · · · · ·    · · x · ·
· · x · ·    · x · x ·    · · · · ·
· · x · ·    x · · · x    · · · · ·

where existing elements are marked as 'x' and nonexisting elements are denoted as '·'.

The standard three-way structure leads to ranking operations where data from different spatial directions are ranked separately. When used to apply morphological operators, standard three-way structures can preserve edges better than box structures, especially when applied recursively.

See also
CircularStructure, OrthogonalStructure, DiagonalStructure, StarStructure

Definition at line 785 of file StructuringElement.h.

Constructor & Destructor Documentation

◆ ThreeWayStructure() [1/2]

pcl::ThreeWayStructure::ThreeWayStructure ( int  size)
inline

Constructs a standard three-way structure of the specified size.

Definition at line 792 of file StructuringElement.h.

◆ ThreeWayStructure() [2/2]

pcl::ThreeWayStructure::ThreeWayStructure ( const ThreeWayStructure )
default

Copy constructor.

Member Function Documentation

◆ Clone()

StructuringElement* pcl::ThreeWayStructure::Clone ( ) const
inlineoverridevirtual

Returns a pointer to a dynamically allocated duplicate of this structuring element.

Implements pcl::StructuringElement.

Definition at line 804 of file StructuringElement.h.

◆ ElementExists()

bool pcl::ThreeWayStructure::ElementExists ( int  i,
int  j,
int  k 
) const
inlineoverridevirtual

Returns true iff a given element exists in this structure.

Parameters
icolumn position (X-coordinate) of the requested structure element. Must be 0 <= i < n, where n is the structure size.
jrow position (Y-coordinate) of the requested structure element. Must be 0 <= j < n, where n is the structure size.
kWay index. Must be 0 <= k < m, where m is the number of ways defined in this structure.

Reimplemented from pcl::StructuringElement.

Definition at line 824 of file StructuringElement.h.

◆ IsBox()

bool pcl::ThreeWayStructure::IsBox ( int  k) const
inlineoverridevirtual

Returns true iff this is a box structure. All elements in a box structure are existing elements.

As reimplemented by ThreeWayStructure, this member function always returns false.

Reimplemented from pcl::StructuringElement.

Definition at line 816 of file StructuringElement.h.


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