mia-3dprop...boundingbox(1)
bestie, you opened mia-3dprop...boundingbox(1) from the General Commands Manual, and it's literally all about proposing a bounding box for an image. No cap. ๐
โจ
๐ธ NAME ๐ธ
mia-3dpropose-boundingbox โ evaluate a bounding box for the image. That's it, that's the whole name vibe. ๐
๐ SYNOPSIS ๐
mia-3dpropose-boundingbox -i <in-file> [options]
Okay so you run it with -i <in-file> and then any options you want. Slay. ๐
๐ DESCRIPTION ๐
mia-3dpropose-boundingbox is the main character here: it evaluates a box that contains all the pixels of a given mask image. ๐ซถ
If the input image is not a binary image, a pre-filter must be applied that converts the input image into a mask. Like, no pre-filter? Then you're not getting your mask-based bounding box moment. Periodt. ๐
โ๏ธ OPTIONS โ๏ธ
๐ File-IO ๐
-i --in-file=(input, required); ioโ input image(s) to be filtered. For supported file types seePLUGINS:3dimage/io. โจ
๐ Help & Info ๐
-V --verbose=warningโ verbosity of output, print messages of given level and higher priorities. Supported priorities starting at 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 ๐-h --helpโ print this help ๐-? --usageโ print a short help ๐ซถ--versionโ print the version number and exit ๐ท๏ธ
๐๏ธ Parameters ๐๏ธ
-f --filter=โ Filter to be applied to the image before the bounding box is evaluated. Must return a bit-valued image. For supported plugins seePLUGINS:3dimage/filter. ๐-p --padding=0; uint in [0, inf)โ Padding of boundaries. ๐งธ
๐งต Processing ๐งต
--threads=-1โ Maximum number of threads to use for processing. This number should be lower or equal to the number of logical processor cores in the machine. (-1: automatic estimation). ๐ง
๐ PLUGINS: 1d/spacialkernel ๐
cdiff
Central difference filter kernel, mirror boundary conditions are used.
(no parameters)
gauss
spacial Gauss filter kernel, supported parameters are:
w = 1; uint in [0, inf)โ half filter width.
scharr
This plugin provides the 1D folding kernel for the Scharr gradient filter.
(no parameters)
๐ PLUGINS: 1d/splinebc ๐
mirror
Spline interpolation boundary conditions that mirror on the boundary.
(no parameters)
repeat
Spline interpolation boundary conditions that repeats the value at the boundary.
(no parameters)
zero
Spline interpolation boundary conditions that assumes zero for values outside.
(no parameters)
โจ PLUGINS: 1d/splinekernel โจ
bspline
B-spline kernel creation, supported parameters are:
d = 3; int in [0, 5]โ Spline degree.
omoms
OMoms-spline kernel creation, supported parameters are:
d = 3; int in [3, 3]โ Spline degree.
๐งฉ PLUGINS: 3dimage/combiner ๐งฉ
absdiff
Image combiner 'absdiff'
(no parameters)
add
Image combiner 'add'
(no parameters)
div
Image combiner 'div'
(no parameters)
mul
Image combiner 'mul'
(no parameters)
sub
Image combiner 'sub'
(no parameters)
๐ PLUGINS: 3dimage/filter ๐
bandpass
intensity bandpass filter, supported parameters are:
max = 3.40282e+38; floatโ maximum of the band.min = 0; floatโ minimum of the band.
binarize
image binarize filter, supported parameters are:
max = 3.40282e+38; floatโ maximum of accepted range.min = 0; floatโ minimum of accepted range.
close
morphological close, supported parameters are:
hint = black; stringโ a hint at the main image content (black|white).shape = [sphere:r=2]; factoryโ structuring element. For supported plug-ins seePLUGINS:3dimage/shape.
combiner
Combine two images with the given combiner operator. If 'reverse' is set to false, the first operator is the image passed through the filter pipeline, and the second image is loaded from the file given with the 'image' parameter the moment the filter is run. Supported parameters are:
image =(input, required, io)โ second image that is needed in the combiner. For supported file types seePLUGINS:3dimage/io.op =(required, factory)โ Image combiner to be applied to the images. For supported plug-ins seePLUGINS:3dimage/combiner.reverse = 0; boolโ reverse the order in which the images passed to the combiner.
convert
image pixel format conversion filter, supported parameters are:
a = 1; floatโ linear conversion parameter a.b = 0; floatโ linear conversion parameter b.map = opt; dictโ conversion mapping. Supported values are:copyโ copy data when convertinglinearโ apply linear transformationx -> a*x+brangeโ apply linear transformation that maps the input data type range to the output data type rangeoptโ apply a linear transformation that maps the real input range to the full output rangeoptstatโ apply a linear transform that maps based on input mean and variation to the full output range
repn = ubyte; dictโ output pixel type. Supported values are:bitโ binary datasbyteโ signed 8 bitubyteโ unsigned 8 bitsshortโ signed 16 bitushortโ unsigned 16 bitsintโ signed 32 bituintโ unsigned 32 bitslongโ signed 64 bitulongโ unsigned 64 bitfloatโ floating point 32 bitdoubleโ floating point 64 bitnoneโ no pixel type defined
crop
Crop a region of an image, the region is always clamped to the original image size in the sense that the given range is kept. Supported parameters are:
end = [[4294967295,4294967295,4294967295]]; streamableโ end of cropping range, maximum =(-1,-1,-1).start = [[0,0,0]]; streamableโ begin of cropping range.
dilate
3d image stack dilate filter, supported parameters are:
hint = black; stringโ a hint at the main image content (black|white).shape = [sphere:r=2]; factoryโ structuring element. For supported plug-ins seePLUGINS:3dimage/shape.
distance
Evaluate the 3D distance transform of an image. If the image is a binary mask, then result of the distance transform in each point corresponds to the Euclidian distance to the mask. If the input image is of a scalar pixel value, then the this scalar is interpreted as heighfield and the per pixel value adds to the distance.
(no parameters)
downscale
Downscale the input image by using a given block size to define the downscale factor. Prior to scaling the image is filtered by a smoothing filter to eliminate high frequency data and avoid aliasing artifacts. Supported parameters are:
b = [[1,1,1]]; 3dboundsโ blocksize.bx = 1; uint in [1, inf)โ blocksize in x direction.by = 1; uint in [1, inf)โ blocksize in y direction.bz = 1; uint in [1, inf)โ blocksize in z direction.kernel = gauss; factoryโ smoothing filter kernel to be applied, the size of the filter is estimated based on the blocksize. For supported plug-ins seePLUGINS:1d/spacialkernel.
erode
3d image stack erode filter, supported parameters are:
hint = black; stringโ a hint at the main image content (black|white).shape = [sphere:r=2]; factoryโ structuring element. For supported plug-ins seePLUGINS:3dimage/shape.
gauss
isotropic 3D gauss filter, supported parameters are:
w = 1; int in [0, inf)โ filter width parameter.
gradnorm
3D image to gradient norm filter
(no parameters)
growmask
Use an input binary mask and a reference gray scale image to do region growing by adding the neighborhood pixels of an already added pixel if they have a lower intensity that is above the given threshold. Supported parameters are:
min = 1; floatโ lower threshold for mask growing.ref =(input, required, io)โ reference image for mask region growing. For supported file types seePLUGINS:3dimage/io.shape = 6n; factoryโ neighborhood mask. For supported plug-ins seePLUGINS:3dimage/shape.
invert
intensity invert filter
(no parameters)
isovoxel
This filter scales an image to make the voxel size isometric and its size to correspond to the given value, supported parameters are:
interp = [bspline:d=3]; factoryโ interpolation kernel to be used. For supported plug-ins seePLUGINS:1d/splinekernel.size = 1; float in (0, inf)โ isometric target voxel size.
kmeans
3D image k-means filter. In the output image the pixel value represents the class membership and the class centers are stored as attribute in the image. Supported parameters are:
c = 3; int in [2, inf)โ number of classes.labelโ okay so this one labels the connected components of a binary image, i.e. it finds all the lil blobby besties that are touching and gives each squad its own number ๐ซถ๐ its supported parameters are:n = 6n; factoryโ the neighborhood mask. Want to know which plug-ins you can plug in here? Go look atPLUGINS:3dimage/shapeโจ
labelmapโ an image filter that remaps label id's. Heads up: this is only applicable to images with integer valued intensities/labels, no faking it with floats bestie ๐ its supported parameters are:map =(input, required, string)โ the label mapping file.
labelscaleโ a filter that only creates output voxels that are already created in the input image. The scaling is done with a voting algorithm that picks the target pixel value based on the highest pixel count of a certain label in the corresponding source region. And if the region has two labels with the same count? The one with the lower number wins, periodt ๐ its supported parameters are:out-size =(required, 3dbounds)โ target size, given as two coma separated values.
loadโ loads the input image from a file and uses it to replace the current image in the pipeline, like a lil glow-up swap ๐ธ its supported parameters are:file =(input, required, io)โ name of the input file to load from. (yes the original literally has two periods, we keep it ๐) For supported file types seePLUGINS:3dimage/io
lvdownscaleโ this is a label voting downscale filter. It downscales a 3D image by blocks, and for each block the (non-zero) label that shows up the most times in that block gets issued as the output pixel in the target image. If two labels appear the same number of times, the one with the lower absolute value wins โ tie goes to the smaller number, no cap ๐ its supported parameters are:b = [[1,1,1]]; 3dboundsโ blocksize for the downscaling. Each block gets represented by one pixel in the target image.
maskโ masks an image: one image is taken from the parameters list and the other comes from the normal filter input. Both images must be of the same dimensions and one of them must be binary. The attributes of the image coming through the filter pipeline are preserved, and the output pixel type corresponds to the input image that is not binary ๐ฆ its supported parameters are:input =(input, required, io)โ second input image file name. For supported file types seePLUGINS:3dimage/io
meanโ 3D image mean filter, the classic smoothing vibe โจ its supported parameters are:w = 1; int in [1, inf)โ half filter width.
medianโ median 3d filter, so good at killing noise fr fr ๐ its supported parameters are:w = 1; int in [1, inf)โ filter width parameter.
mlvโ Mean of Least Variance 3D image filter, iykyk ๐ its supported parameters are:w = 1; int in [1, inf)โ filter width parameter.
msnormalizerโ 3D image mean-sigma normalizing filter, it's giving very normalized bestie energy ๐ its supported parameters are:w = 1; int in [1, inf)โ half filter width.
openโ morphological open ๐ธ its supported parameters are:hint = black; stringโ a hint at the main image content (black|white).shape = [sphere:r=2]; factoryโ the structuring element. For supported plug-ins seePLUGINS:3dimage/shape
reorientโ 3D image reorientation filter, aka spin that image around the main character energy ๐ซ its supported parameters are:map = xyz; dictโ the oriantation mapping to be applied. Supported values are:xyzโ keep orientationp-yzxโ permutate x->z->y->xp-zxyโ permutate x->y->z->xf-yzโ flip y-zf-xyโ flip x-yf-xzโ flip x-zr-x90โ rotate around x-axis clockwise 90 degreer-x180โ rotate around x-axis clockwise 180 degreer-x270โ rotate around x-axis clockwise 270 degreer-y90โ rotate around y-axis clockwise 90 degreer-y180โ rotate around y-axis clockwise 180 degreer-y270โ rotate around y-axis clockwise 270 degreer-z90โ rotate around z-axis clockwise 90 degreer-z180โ rotate around z-axis clockwise 180 degreer-z270โ rotate around z-axis clockwise 270 degree
resizeโ resizes an image. The original data is centered within the new sized image, cute and symmetrical ๐ its supported parameters are:size = [[0,0,0]]; streamableโ new size of the image. A size 0 indicates to keep the size for the corresponding dimension.
sandpโ salt and pepper 3d filter, the spicy one ๐ถ๏ธโจ its supported parameters are:thresh = 100; float in [0, inf)โ thresh value.w = 1; int in [1, inf)โ filter width parameter.
scaleโ 3D image filter that scales to a given target size, living its resized dream ๐ its supported parameters are:interp = [bspline:d=3]; factoryโ interpolation kernel to be used. For supported plug-ins seePLUGINS:1d/splinekernels = [[0,0,0]]; 3dboundsโ target size to set all components at once (component 0:use input image size).sx = 0; uint in [0, inf)โ target size in x direction (0:use input image size).sy = 0; uint in [0, inf)โ target size in y direction (0:use input image size).sz = 0; uint in [0, inf)โ target size in y direction (0:use input image size).
scharrโ the 3D Scharr filter for gradient evaluation ๐ฅ Big heads-up though: the output pixel type of the filtered image is the same as the input pixel type, so converting the input beforehand to a floating point valued image is recommendable. Do it, trust ๐ its supported parameters are:dir = x; dictโ Gradient direction. Supported values are:xโ gradient in x-directionyโ gradient in y-directionzโ gradient in z-direction
selectbigโ a filter that creats a binary mask representing the intensity with the highest pixel count. The pixel value0will be ignored, and if two intensities have the same pixel count, then the result is undefined ๐ญ so don't come crying to me about it. The input pixel must have an integral pixel type.- (no parameters)
sepconvโ 3D image intensity separaple convolution filter, the separated-convolution slay ๐ its supported parameters are:kx = [gauss:w=1]; factoryโ filter kernel in x-direction. For supported plug-ins seePLUGINS:1d/spacialkernelky = [gauss:w=1]; factoryโ filter kernel in y-direction. For supported plug-ins seePLUGINS:1d/spacialkernelkz = [gauss:w=1]; factoryโ filter kernel in z-direction. For supported plug-ins seePLUGINS:1d/spacialkernel
sobelโ the 2D Sobel filter for gradient evaluation โจ same warning as its Scharr bestie: the output pixel type of the filtered image is the same as the input pixel type, so converting the input beforehand to a floating point valued image is recommendable. No cap ๐ its supported parameters are:dir = x; dictโ Gradient direction. Supported values are:xโ gradient in x-directionyโ gradient in y-directionzโ gradient in z-direction
swsโ seeded watershead. The algorithm extracts exactly so many reagions as initial labels are given in the seed image, iconic behaviour honestly ๐ its supported parameters are:grad = 0; boolโ Interpret the input image as gradient.mark = 0; boolโ Mark the segmented watersheds with a special gray scale value.n = [sphere:r=1]; factoryโ Neighborhood for watershead region growing. For supported plug-ins seePLUGINS:3dimage/shapeseed =(input, required, string)โ seed input image containing the labels for the initial regions.
teeโ saves the input image to a file and also passes it through to the next filter, like a lil splitter bestie that refuses to choose ๐ซถ its supported parameters are:file =(output, required, io)โ name of the output file to save the image too. (yes, "too", we keep it ๐) For supported file types seePLUGINS:3dimage/io
thinningโ 3D morphological thinning, based on: Lee and Kashyap, 'Building Skeleton Models via 3-D Medial Surface/Axis Thinning Algorithms', Graphical Models and Image Processing, 56(6):462-478, 1994. This implementation only supports the 26 neighbourhood, so that's the vibe check ๐ฆ- (no parameters)
transformโ transforms the input image with the given transformation ๐ช its supported parameters are:file =(input, required, io)โ Name of the file containing the transformation. For supported file types seePLUGINS:3dtransform/ioimgboundary = ; factoryโ override image interpolation boundary conditions. For supported plug-ins seePLUGINS:1d/splinebcimgkernel = ; factoryโ override image interpolator kernel. For supported plug-ins seePLUGINS:1d/splinekernel
varianceโ 3D image variance filter, math girlie โจ its supported parameters are:w = 1; int in [1, inf)โ half filter width.
wsโ basic watershead segmentation, the lowkey version of the seeded one ๐ its supported parameters are:evalgrad = 0; boolโ Set to1if the input image does not represent a gradient norm image.mark = 0; boolโ Mark the segmented watersheds with a special gray scale value.n = [sphere:r=1]; factoryโ Neighborhood for watershead region growing. For supported plug-ins seePLUGINS:3dimage/shapethresh = 0; float in [0, 1)โ Relative gradient norm threshold. The actual value threshold value isthresh * (max_grad - min_grad) + min_grad. Bassins separated by gradients with a lower norm will be joined.
๐ PLUGINS: 3dimage/io ๐
okay bestie, this is the whole roster of file formats this thing can read and write for 3D images. every plugin, every extension, every element type โ no skipping, we're doing this right ๐
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
datapoolโ virtual IO to and from the internal data pool
Recognized file extensions: .@
dicomโ Dicom image series as 3D
Recognized file extensions: .DCM, .dcm
Supported element types:
- signed 16 bit
- unsigned 16 bit
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
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
mhdโ MetaIO 3D image IO using the VTK implementation (experimental)
experimental, bestie. it's giving "we're testing this, don't be shocked if it acts up" ๐
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
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
vffโ VFF Sun raster format
Recognized file extensions: .VFF, .vff
Supported element types:
- unsigned 8 bit
- signed 16 bit
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
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
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
๐ฎ PLUGINS: 3dimage/shape ๐ธ
tiny but mighty, these are the little shape-makers. โจ
18nโ 18n neighborhood 3D shape creator
(no parameters)
26nโ 26n neighborhood 3D shape creator
(no parameters)
6nโ 6n neighborhood 3D shape creator
(no parameters)
sphereโ closed spherical shape neighborhood including the pixels within a given radius r., supported parameters are:r = 2; float in(0, inf)- sphere radius.
๐ฆ PLUGINS: 3dtransform/io ๐
the transformation-file formats, aka where your 3D transforms go to live ๐
bbsโ binary (non-portable) serialized IO of 3D transformations
Recognized file extensions: .bbs
"non-portable" is right there in the name bestie, don't say nobody told you ๐
datapoolโ virtual IO to and from the internal data pool
Recognized file extensions: .@
vistaโ Vista storage of 3D transformations
Recognized file extensions: .v, .v3dt
xmlโ XML serialized IO of 3D transformations
Recognized file extensions: .x3dt
๐ EXAMPLE ๐
so like. we're evaluating a bounding box with boundary padding of 5 of a mask that came from a binarization with a minimum value 10.10 and a boundary padding of 5, from image image.v. iconic, tbh.
mia-3dpropose-boundingbox -i image.v -f binarize:min=10 -p 5
๐ซถ AUTHOR(s) ๐ซถ
Gert Wollny
(one guy, carrying this whole plugin ecosystem on his back, no cap ๐)
๐ 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.
fr fr, no warranty at all. run --copyright if you want the receipts.
aaaand that's the whole page bestie, we did it ๐
โจ so this is mia-3dprop...boundingbox(1) from the USER COMMANDS crew, version v2.4.7 โ that's the version and the source tag, and the footer date is the classic 2015-ish era of this manpage. go forth and bounding-box responsibly, ily, bye ๐ฆ๐
๐ฆ where this page comes from
- 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