isce3
0.25.0
Loading...
Searching...
No Matches
cxx
isce3
unwrap
icu
LabelMap.h
1
#pragma once
2
3
#include <cstddef>
// size_t
4
#include <cstdint>
// uint8_t
5
#include <vector>
// std::vector
6
7
namespace
isce3::unwrap::icu
8
{
9
10
// \brief Table of connected component label equivalences
11
//
12
// Maintains a list of all connected component labels along with a mapping
13
// to their minimum equivalent label.
14
class
LabelMap
15
{
16
public
:
17
// Constructor
18
LabelMap();
19
// Add new label to table and return the label.
20
uint8_t nextlabel();
21
// Get mapped label.
22
uint8_t getlabel(
const
uint8_t)
const
;
23
// Update a label mapping.
24
void
setlabel(
const
uint8_t oldlabel,
const
uint8_t newlabel);
25
// Get number of labels.
26
size_t
size()
const
;
27
28
private
:
29
// Table of label mappings.
30
std::vector<uint8_t> _labels;
31
};
32
33
}
34
35
// Get inline implementations.
36
#define ISCE_UNWRAP_ICU_LABELMAP_ICC
37
#include "LabelMap.icc"
38
#undef ISCE_UNWRAP_ICU_LABELMAP_ICC
Generated for ISCE3.0 by
1.13.2.