#include "diplib/chain_code.h"
Code class
Encodes a single chain code, as used by dip::ChainCode
.
Contents
Chain codes are between 0 and 3 for connectivity = 1, and between 0 and 7 for connectivity = 2. 0 means to the right in both cases. The border flag marks pixels at the border of the image.
Constructors, destructors, assignment and conversion operators
Functions
- auto IsBorder() const -> bool
- Returns whether the border flag is set
- auto IsEven() const -> bool
- Is it an even code?
- auto IsOdd() const -> bool
- Is it an off code?
- auto Delta8() const -> dip::VertexInteger const&
- The change in coordinates for an 8-connected chain code
- auto Delta4() const -> dip::VertexInteger const&
- The change in coordinates for a 4-connected chain code
Operators
- auto operator unsigned() const -> unsigned int
- Returns the chain code
- auto operator==(dip::ChainCode::Code const& c2) const -> bool
- Compare codes
- auto operator!=(dip::ChainCode::Code const& c2) const -> bool
- Compare codes