UNU-SLICE(1)
π unu-slice π
ok so bestie, welcome to unu-slice from the User Commands manual β it's the lil tool that slices along one or more axes at given positions β¨ and honestly? it's giving surgical precision π
β¨ NAME β¨
unu-slice β slice along one or more axes at given positions π¦
πΈ SYNOPSIS πΈ
unu slice -a,--axis <axis ...> -p,--position <pos ...> [-i,--input
<nin>] [-o,--output <nout>]
π DESCRIPTION π
ok so here's the vibe: you slice along one or more axes at given positions. no cap. π₯
the output nrrd dimension is less than the input nrrd dimension by the number of slice axes β except when the input is, or gets down to, 1-D. (so if you slice it all the way down, she stays 1-D, periodt π)
and yes, you can slice on all axes in order to sample a single value from the array. one (1) single lil value. main character energy honestly π
per-axis information is preserved. she remembers where she came from π₯Ί
- Uses
nrrdSlice(possibly called multiple times) β lowkey the real MVP, iykyk
π OPTIONS π
-a <axis ...>,--axis <axis ...>β single axis or multiple axes to slice along π« giving multiple axes here leads to doing multiple slices (at the corresponding positions given with-p). okay so listen: multiple axes should be identified in terms of the axis numbering of the original nrrd β because as the slices are done (in the given ordering), the actual slice axis will be different if previous slices were on lower-numbered (faster) axes. so like, stay woke on that one π (1 or more unsigned ints)-p <pos>,--position <pos>β position(s) to slice at π:<int>gives 0-based indexM-<int>give index relative to the last sample on the axis (M==#samples-1). soM-0is the very last one, bestie π
-i <nin>,--input <nin>β input nrrd π₯-o <nout>,--output <nout>β output nrrd (string); default:-π€ (yes the default is literally-, she's mysterious like that β¨)
π SEE ALSO π
unu(1)β go read the whole fam, they're all iconic π«Ά
not me getting emotional over a slicing utility π but fr fr, slice responsibly and always check your axis numbering π
ok bye bestie, this page is from August 2021, straight outta the User Commands manual, and it's a whole serve π β¨ π§
π¦ 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