(Incrementally) Label clusters (0 as background, 1..n as labels).
More...
#include <GooseEYE/GooseEYE.h>
|
template<class T > |
| ClusterLabeller (const T &shape) |
|
template<class T , class K > |
| ClusterLabeller (const T &shape, const K &kernel) |
|
void | reset () |
| Reset labels to zero.
|
|
void | prune () |
| Prune: renumber labels to lowest possible label, see also AvalancheSegmenter::nlabels.
|
|
template<class T > |
void | add_image (const T &img) |
| Add image.
|
|
template<class T > |
void | add_points (const T &begin, const T &end) |
| Add sequence of points.
|
|
template<class T > |
void | add_points (const T &idx) |
| Add sequence of points.
|
|
template<class T > |
std::vector< size_t > | add_sequence (const T &idx) |
| Add a sequence of points.
|
|
std::string | repr () const |
| Basic class info.
|
|
const auto & | shape () const |
| Shape of ClusterLabeller::s and ClusterLabeller::labels.
|
|
auto | size () const |
| Size of ClusterLabeller::s and ClusterLabeller::labels (== prod(shape) ).
|
|
const auto & | labels () const |
| Per block, the label (0 for background).
|
|
|
static constexpr size_t | Dim = Dimension |
| Dimensionality of the system.
|
|
static constexpr bool | Periodic = Periodicity |
| Periodicity of the system.
|
|
template<size_t Dimension, bool Periodicity = true>
class GooseEYE::ClusterLabeller< Dimension, Periodicity >
(Incrementally) Label clusters (0 as background, 1..n as labels).
- Template Parameters
-
Dimension | The rank (a.k.a. dimension ) of the image. |
- Note
- The default kernel is
GooseEYE::kernel::nearest()
.
Definition at line 672 of file GooseEYE.h.
◆ ClusterLabeller() [1/2]
template<size_t Dimension, bool Periodicity = true>
template<class T >
- Parameters
-
shape | Shape of the system. |
Definition at line 714 of file GooseEYE.h.
◆ ClusterLabeller() [2/2]
template<size_t Dimension, bool Periodicity = true>
template<class T , class K >
◆ add_image()
template<size_t Dimension, bool Periodicity = true>
template<class T >
Add image.
Previous labels are not overwritten.
- Parameters
-
img | Image (can be incremental only). |
Definition at line 1025 of file GooseEYE.h.
◆ add_points() [1/2]
template<size_t Dimension, bool Periodicity = true>
template<class T >
Add sequence of points.
- Parameters
-
begin | Iterator to first point. |
end | Iterator to last point. |
Definition at line 1061 of file GooseEYE.h.
◆ add_points() [2/2]
template<size_t Dimension, bool Periodicity = true>
template<class T >
Add sequence of points.
- Parameters
-
Definition at line 1078 of file GooseEYE.h.
◆ add_sequence()
template<size_t Dimension, bool Periodicity = true>
template<class T >
Add a sequence of points.
Mark index every time a new cluster is started or a cluster is merged.
- Parameters
-
- Returns
- List of indices.
Definition at line 1093 of file GooseEYE.h.
◆ labels()
template<size_t Dimension, bool Periodicity = true>
Per block, the label (0
for background).
- Returns
- array of signed integers.
Definition at line 1165 of file GooseEYE.h.
◆ prune()
template<size_t Dimension, bool Periodicity = true>
Prune: renumber labels to lowest possible label, see also AvalancheSegmenter::nlabels.
- Note
- This might change all labels.
Definition at line 788 of file GooseEYE.h.
◆ repr()
template<size_t Dimension, bool Periodicity = true>
Basic class info.
- Returns
- std::string
Definition at line 1135 of file GooseEYE.h.
◆ reset()
template<size_t Dimension, bool Periodicity = true>
◆ shape()
template<size_t Dimension, bool Periodicity = true>
◆ size()
template<size_t Dimension, bool Periodicity = true>
◆ Dim
template<size_t Dimension, bool Periodicity = true>
Dimensionality of the system.
Definition at line 674 of file GooseEYE.h.
◆ Periodic
template<size_t Dimension, bool Periodicity = true>
Periodicity of the system.
Definition at line 675 of file GooseEYE.h.
The documentation for this class was generated from the following file: