Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ label_serial() [2/2]

void pism::connected_components::label_serial ( double image,
int  nrows,
int  ncols,
bool  mark_isolated_components,
int  reachable,
int  min_label 
)

Label connected components in an image, modifying it "in place".

The image is nrows, ncols in size. Positive values are treated as "foreground", zero or negative as "background".

If mark_isolated_components is set, then label isolated patches with 1 and patches connected to values marked with reachable with zeros.

If mark_isolated_components is not set, then assign a unique (consecutive) labels to each patch, starting with first_label.

Definition at line 31 of file label_components_serial.cc.

References label().

Referenced by label_serial().