UNU-ACROP(1)
π NAME π
unu-acrop β bestie, this is a User Command (section 1 of the manual, iykyk) that automatically crops axes based on a given measure. She trims the boring ends off your data so you don't have to. π
β¨ SYNOPSIS β¨
unu acrop [-a,--axes [<ax0 ...>]] -m,--measure <measr> [-f,--frac
<frac>] [-off,--offset <offset>] [-b,--bounds <filename>] [-i,--input
<nin>] [-o,--output <nout>]
π¦ DESCRIPTION π¦
Okay so here's the vibe: it automatically crops axes based on a given measure. π«Ά
For the axes that are getting cropped, the slices perpendicular to that axis get projected down into a single scalar using the measure you picked. That gives you a 1-D array, and then we analyze it β figuring out which chunks at the beginning and the end add up to less than some portion of the cumulative array sum. Those ends? Cropped off. Gone. Bye. βοΈ
And the best part, fr fr: the cropping bounds we figure out can be saved and then applied to other arrays via the -b option. Reuse queen. π
- Uses
nrrdCropAuto
π OPTIONS π
-a [<ax0 ...>],--axes [<ax0 ...>]β the axes (if any) that should NOT be cropped. That's 0 or more unsigned ints, bestie. default:" "(yes, a single space, iconic)-m <measr>,--measure <measr>β How to measure slices (along the axes to crop) as scalars, to form the 1-D array that gets analyzed to determine the cropping extent. Every single measure fromunu-project(1)works here, but the ones that actually make sense for this job include:"max","mean","median","variance": (self-explanatory, no notes π )"stdv": standard deviation"cov": coefficient of variation"product","sum": product or sum of all values"L1","L2","NL2","RMS","Linf": different norms
-f <frac>,--frac <frac>β threshold of cumulative sum of the 1-D array at which to crop. Needs to be in the interval[0.0,0.5). (double); default:"0.1"-off <offset>,--offset <offset>β how much to offset the numerically determined cropping. A positive offset means expanding the interval of kept indices (less cropping) (int); default:"1"-b <filename>,--bounds <filename>β if a filename is given here, the automatically determined min and max bounds for cropping get saved to this file as a 2-D array; first scanline is for-min, second is for-max. π Unfortunately, nothing using the"m"and"M"semantics (above) can currently be saved in the bounds file. (string)-i <nin>,--input <nin>β input nrrd-o <nout>,--output <nout>β output nrrd (string); default:"-"
π SEE ALSO π
π Heads up bestie:-fmust live in[0.0,0.5)β don't try to be different, she won't allow it.
Okay that's the whole page, mwah π«Ά this one's from August 2021, straight outta the UNU-ACROP(1) era β section 1, User Commands, no cap. Go crop something iconic. πβ¨
π¦ 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