mia-3dgetslice(1)
π mia-3dgetslice β the manual, but make it make sense π
okay bestie, you found the mia-3dgetslice(1) page (section 1, the user-commands girlies) and honestly? it's a bop. she takes a big chunky 3D image and pulls 2D slices out of it like π strawberries out of a punnet. sit down, grab a snack, we're doing this. β¨
β¨ NAME β¨
mia-3dgetslice β extract slices from a 3D image. that's it. that's the whole job. slicing. iconic behavior. π
π SYNOPSIS π
mia-3dgetslice -i <in-file> -o <out-file> [options]
π¦ DESCRIPTION π¦
so, mia-3dgetslice is the program you call when you've got a 3D data set and you want 2D slices out of it, each one saved into its own separate file. it's giving "cutting a cake but the cake is volumetric data". π
and the naming? she's organized fr fr β the output files get numbered according to their slice index. no cap, no chaos, just tidy numbered files. β¨
π OPTIONS π
-i,--in-file=(input, required); io β the input image(s) you want filtered. for the file types she can actually read, go peek atPLUGINS:3dimage/iodown below. π-o,--out-file=(output, required); io β the output image(s). here's the tea though, it depends on the count:- if the number of outputs != 1, this is used as a base name and you should give it without an extension, because the extension comes from the
--typeoption. she'll handle the rest, trust. π«Ά - if the number of outputs = 1, then this exact file name gets used, verbatim, no games.
- for the supported file types, see
PLUGINS:2dimage/io.
- if the number of outputs != 1, this is used as a base name and you should give it without an extension, because the extension comes from the
-t,--type=png β the output file type for when the number != 1.- Supported values are:
bmp,datapool,dicom,exr,jpg,png,raw,tif,vista.
- Supported values are:
-s,--start=0 β start slice number. where do we begin, bestie?-n,--number=1 β number of slices (all=0). so0means "give me everything", greedy queen. π--ndigits=4 β minimum number of digits in the file name numbers (only matters ifn != 1). zero-padding for the aesthetics. π-d,--dir=xy β slice direction (xy=axial,xz=coronal,yz=saggital).xyβ get xy (axial) slicexzβ get xz (coronal) sliceyzβ get yz (saggital) slice
π¬ Help & Info π¬
-V,--verbose=warning β verbosity of output; she prints messages of the given level and higher priorities. the supported priorities, starting at the lowest level, are:traceβ Function call tracedebugβ Debug outputinfoβ Low level messagesmessageβ Normal messageswarningβ Warningsfailβ Report test failureserrorβ Report errorsfatalβ Report only fatal errors
--copyrightβ print copyright information. the receipts, basically. π§Ύ-h,--helpβ print this help.-?,--usageβ print a short help. the lil snack-sized version.--versionβ print the version number and exit. bye bestie π
π₯ Processing π₯
--threads=-1 β Maxiumum number of threads to use for processing. (yes, that typo is hers, we don't fix her, we love her as she is π). This number should be lower or equal to the number of logical processor cores in the machine. (-1: automatic estimation). so just leave it at-1and let her cook. π³
πΈ PLUGINS: 2dimage/io πΈ
the 2D file-format squad. here's who showed up:
bmpβ BMP 2D-image input/output support. The plug-in supports reading and writing of binary images and 8-bit gray scale images. read-only support is provided for 4-bit gray scale images. The color table is ignored and the pixel values are taken as literal gray scale values.- Recognized file extensions:
.BMP,.bmp - Supported element types: binary data, unsigned 8 bit
- Recognized file extensions:
datapoolβ Virtual IO to and from the internal data pool.- Recognized file extensions:
.@
- Recognized file extensions:
dicomβ 2D image io for DICOM.- Recognized file extensions:
.DCM,.dcm - Supported element types: signed 16 bit, unsigned 16 bit
- Recognized file extensions:
exrβ a 2dimage io plugin for OpenEXR images.- Recognized file extensions:
.EXR,.exr - Supported element types: unsigned 32 bit, floating point 32 bit
- Recognized file extensions:
jpgβ a 2dimage io plugin for jpeg gray scale images.- Recognized file extensions:
.JPEG,.JPG,.jpeg,.jpg - Supported element types: unsigned 8 bit
- Recognized file extensions:
pngβ a 2dimage io plugin for png images.- Recognized file extensions:
.PNG,.png - Supported element types: binary data, unsigned 8 bit, unsigned 16 bit
- Recognized file extensions:
rawβ RAW 2D-image output support.- Recognized file extensions:
.RAW,.raw - Supported element types: binary data, signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
tifβ TIFF 2D-image input/output support.- Recognized file extensions:
.TIF,.TIFF,.tif,.tiff - Supported element types: binary data, unsigned 8 bit, unsigned 16 bit, unsigned 32 bit
- Recognized file extensions:
vistaβ a 2dimage io plugin for vista images.- Recognized file extensions:
.-,.V,.VISTA,.v,.vista - Supported element types: binary data, signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
π PLUGINS: 3dimage/io π
and here's the 3D squad, aka the ones your -i can actually be:
analyzeβ Analyze 7.5 image.- Recognized file extensions:
.HDR,.hdr - Supported element types: unsigned 8 bit, signed 16 bit, signed 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
datapoolβ Virtual IO to and from the internal data pool.- Recognized file extensions:
.@
- Recognized file extensions:
dicomβ Dicom image series as 3D.- Recognized file extensions:
.DCM,.dcm - Supported element types: signed 16 bit, unsigned 16 bit
- Recognized file extensions:
hdf5β HDF5 3D image IO.- Recognized file extensions:
.H5,.h5 - Supported element types: binary data, signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, signed 64 bit, unsigned 64 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
inriaβ INRIA image.- Recognized file extensions:
.INR,.inr - Supported element types: signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
mhdβ MetaIO 3D image IO using the VTK implementation (experimental).- Recognized file extensions:
.MHA,.MHD,.mha,.mhd - Supported element types: signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
niftiβ NIFTI-1 3D image IO. The orientation is transformed in the same way like it is done withdicomtonifti --no-reorderfrom the vtk-dicom package.- Recognized file extensions:
.NII,.nii - Supported element types: signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, signed 64 bit, unsigned 64 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
vffβ VFF Sun raster format.- Recognized file extensions:
.VFF,.vff - Supported element types: unsigned 8 bit, signed 16 bit
- Recognized file extensions:
vistaβ Vista 3D.- Recognized file extensions:
.-,.V,.VISTA,.v,.vista - Supported element types: binary data, signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
vtiβ 3D image VTK-XML in- and output (experimental).- Recognized file extensions:
.VTI,.vti - Supported element types: signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
vtkβ 3D VTK image legacy in- and output (experimental).- Recognized file extensions:
.VTK,.VTKIMAGE,.vtk,.vtkimage - Supported element types: signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
π EXAMPLE π
okay so the goal here: store 5 coronal slices starting at slice 120, as coronalXXXX.png, from image.v. look how cute:
mia-3dgetslice -i image.v -o coronal -t png -n 5 -s 120
ate. no crumbs. π₯
π AUTHOR(s) π
Gert Wollny β yes, the legend herself/himself. we stan. π
π COPYRIGHT π
This software is Copyright (c) 1999β2015 Leipzig, Germany and Madrid, Spain. It comes with ABSOLUTELY NO WARRANTY and you may redistribute it under the terms of the GNU GENERAL PUBLIC LICENSE Version 3 (or later). For more information run the program with the option --copyright.
β οΈ bestie, note the ALL CAPS: ABSOLUTELY NO WARRANTY. that's not a vibe, that's a legal fact, don't come for her if it breaks. π
and that's the whole page, fr fr π this little slice of documentation lives under USER COMMANDS, stamped v2.4.7, and it's the mia-3dgetslice(1) page in all her glory. go slice something pretty, bestie β you got this. π«Άβ¨πΈ
π¦ where this page comes from
- debian bookworm: mia-tools 2.4.7-11+b1 Β· GPL-3.0-or-later
- ubuntu noble: mia-tools 2.4.7-13build4 Β· GPL-3.0-or-later
- ubuntu resolute: mia-tools 2.4.7-18 Β· GPL-3.0-or-later
- ubuntu stonking: mia-tools 2.4.7-19build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms