UNU-CCMERGE(1)

πŸ“¦ version 1.11.0, in fedora 43, fedora 44

πŸ’– 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) 1 says that dark islands get merged with bright surrounds, while -1 says 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, use 0 to 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. 1 allows only islands to be merged, 2 does merging with bigger of two neighbors, etc, while 0 says 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 -v option
  • -i <nin> , --input <nin> β€” input nrrd
  • -v <values> , --values <values> β€” result of using unu-ccfind(1) -v, the record of which values were originally associated with each CC. This is required for value-directed merging (with non-zero -d option), or if the -revalue option is given, but is not needed otherwise
  • -o <nout> , --output <nout> β€” output nrrd (string); default: -
⚠️ okay important bestie moment: -c / --connect is 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