RESAMPLE_IMAGE(1)
β¨ RESAMPLE_IMAGE β¨
okay bestie, so this is resample_image from the User Commands manual, section 1, and it's literally the glow-up tool for your images β you feed it pixels, it gives you pixels in a whole new size. π
π NAME π
resample_image β bestie it's resample_image. iconic, no notes, that's the name. π
π DESCRIPTION π
the vibe check first, here's how you call it:
usage: resample_image (--shape|--dim|--reference) [options] input output
what it does: Resample an image to different dimensions. that's it, that's the whole personality. πΈ
π positional arguments π
inputβ the input image, your before pic π«Άoutputβ the output image, your after pic β¨
π¦ options π¦
-h,--helpβ show this help message and exit. the classic. the "wait what do i do" button π-i,--interp {nearest,linear,cubic}β Interpolation (default:linear). pick your vibe for how the in-between pixels get invented π§-o,--origin {centre,corner}β Resampling origin (default:centre). where the resampling anchors itself, basically where the main character stands π-dt,--dtype {char,short,int,float,double}β Data type (default: data type of input image). so if you don't say anything it just matches the input, lowkey polite of it π-n,--nosmoothβ Do not smooth image when downsampling. turning the smoothness OFF, feral mode, we respect it π
π Resampling destination π
Specify the resampling destination space using one of the following options. and heads up bestie, big note incoming:
Note that the --reference option will cause the field-of-view of the input image to be changed to that of the reference image. so like, not just the size, the actual field-of-view, fr fr. π
-s,--shape X,Y,Z,...β Output shape. you're saying exactly how big it should be, dimension by dimension π-d,--dim X,Y,Z,...β Output voxel dimensions. sizing it by the voxels themselves instead β-r,--reference IMAGEβ Resample input to the space of this reference image(overrides--origin). so it just copies the reference's whole setup, and yes it overrides--origin, so don't fight it, it wins πΊ
that's the whole page bestie, every flag, every default, every brace, nothing skipped π―
resample_image 3.29.1 β August 2026 β mwah, that's a wrap, go resample something gorgeous π«Άπβ¨
π¦ where this page comes from
- fedora 44: python3-fslpy 3.29.1-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms