UNU-CCMERGE(1)
π UNU-CCMERGE(1) π
okay bestie, welcome to the unu-ccmerge page β this is part of the User Commands set, and it is genuinely so useful once you get the vibe. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
unu-ccmerge β merge CCs with their neighbors, under various constraints. that's it, that's the whole thing π
π¦ SYNOPSIS π¦
unu ccmerge [-d,--directed <dir>] [-s,--size <max size>] [-n,--neighbor
<max # neigh>] -c,--connect <connectivity> [-revalue] [-i,--input <nin>]
[-v,--values <values>] [-o,--output <nout>]
πΈ DESCRIPTION πΈ
so like. Merge CCs with their neighbors, under various constraints. periodt.
this lil guy operates on the output of unu-ccfind(1) β that's its whole origin story fr. and here's the iconic rule: merging of a CC is always done into its largest neighbor. no cap, always the largest one. it's giving "we only merge into the biggest one" energy π
now, whether or not to merge at all can be constrained by one or more of these:
- CC size (
-s) π - original CC value being brighter or darker (
-d) ππ - number of neighbors (
-n) π« - Uses
nrrdCCMerge
π OPTIONS π
-d <dir>,--directed <dir>β do value-driven merging. Using (positive)1says that dark islands get merged with bright surrounds, while-1says the opposite. By default, merging can go either way.(int); default:0-s <max size>,--size <max size>β a cap on the CC size that will be absorbed into its surround. CCs larger than this are deemed too significant to mess with. Or, use0to remove any such restriction on merging.(int); default:0-n <max # neigh>,--neighbor <max # neigh>β a cap on the number of neighbors that a CC may have if it is to be be merged.1allows only islands to be merged,2does merging with bigger of two neighbors, etc, while0says that number of neighbors is no constraint(int); default:1-c <connectivity>,--connect <connectivity>β what kind of connectivity to use: the number of coordinates that vary in order to traverse the neighborhood of a given sample. In 2D:1: 4-connected,2: 8-connected(unsigned int)-revalueβ If this option is given, then after the merging, the CCs are re-assigned their original datavalues, as given by the-voption-i <nin>,--input <nin>β input nrrd-v <values>,--values <values>β result of usingunu-ccfind(1)-v, the record of which values were originally associated with each CC. This is required for value-directed merging (with non-zero-doption), or if the-revalueoption is given, but is not needed otherwise-o <nout>,--output <nout>β output nrrd(string); default:-
β οΈ okay important bestie moment:-c/--connectis NOT in brackets in the synopsis. it is literally required. do not forget it. the flags in[ ]are optional, that one is not. π«Ά
π SEE ALSO π
unu(1), unu-ccfind(1), unu-ccadj(1), unu-ccsettle(1)
and that's the whole page, you ate that π β¨
this was the August 2021 era of the unu-ccmerge man page, living under the User Commands section β shoutout to the source and version, we love a documented tool π go merge some CCs, bestie, you got this ππ¦
π¦ where this page comes from
- fedora 43: teem 1.11.0-83.fc43 Β· LGPL-2.1-or-later WITH LicenseRef-Fedora-Temporary-Simple-Library-exception
- fedora 43: teem 1.11.0-86.fc43 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- fedora 44: teem 1.11.0-87.fc44 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms