mia-3dimagefilter(1)
β¨ mia-3dimagefilter(1) β¨
okay so bestie, you found yourself in the General Commands Manual for mia-3dimagefilter, and honestly? iconic of you. this page is long so buckle up, we're doing this properly π
πΈ NAME πΈ
mia-3dimagefilter β Filter a 3D images.
(that's the whole name section, no notes, it's giving "short and confident")
π¦ SYNOPSIS π¦
mia-3dimagefilter -i <in-file> -o <out-file> [options]
<PLUGINS:3dimage/filter>
so like, you feed it an input file, you give it an output file, you sprinkle in some options, and then you pick your actual filter from the plugin list. the <PLUGINS:3dimage/filter> bit is literally the whole menu of filters you can choose from, they're all listed further down π
π DESCRIPTION π
mia-3dimagefilter is the program you use to filter and convert gray scale 3D images. that's the job. that's the whole vibe. gray scale 3D images in, filtered gray scale 3D images out. periodt.
π OPTIONS π
-i,--in-file=(required, input); io β the input image(s) you want filtered. for which file types are supported, go peek atPLUGINS:3dimage/io.-o,--out-file=(output, required); io β the output image(s) that have been filtered. for supported file types, again, seePLUGINS:3dimage/io.
π Help & Info π
-V,--verbose=warning β how chatty do you want this program to be? it prints messages of the given level and higher priorities. 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. legal bestie moment π-h,--helpβ print this help.-?,--usageβ print a short help. the drive-thru version.--versionβ print the version number and exit. slay, then dip.
π§ Processing π§
--threads=-1β the maximum number of threads to use for processing. this number should be lower than or equal to the number of logical processor cores in your machine. (-1: automatic estimation, aka let the program figure it out, it's a big girl, she can handle it π«Ά)
π₯ 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 π
this is the main character section, bestie. all the actual filters live here.
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. ifreverseis 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 theimageparameter the moment the filter is run. supported parameters are:image=(required, input, 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 transformation x -> 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 the have a lower intensity that is above the given threshold. supported parameters are:min=1; float β lower threshold for mask growing.ref=(required, input, 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β A filter to label the connected components of a binary image. supported parameters are:n=6n; factory β neighborhood mask. for supported plug-ins seePLUGINS:3dimage/shape.
okay we're not done yet, there's more page coming β don't go anywhere bestie π¦
labelmap π·οΈ
bestie this one is an image filter that remaps label id's. That's it, that's the job. Only applicable to images with integer valued intensities/labels, so don't try this on your float data, she will not cooperate π
supported parameters are:
map=(required, input, string) β label mapping file.
labelscale π
A filter that only creates output voxels that are already created in the input image. The scaling is done by using a voting algorithm that selects the target pixel value based on the highest pixel count of a certain label in the corresponding source region. And if the region comprises two labels with the same count? The one with the lower number wins. democracy but make it pixels π
supported parameters are:
out-size=(required, 3dbounds) β target size given as two coma separated values.
load π
Load the input image from a file and use it to replace the current image in the pipeline. swaperoo, but make it data β¨
supported parameters are:
file=(required, input, io) β name of the input file to load from. For supported file types seePLUGINS:3dimage/io
lvdownscale π½
This is a label voting downscale filter. It downscales a 3D image by blocks. For each block, the (non-zero) label that appears most times in the block is issued as 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, periodt π
supported parameters are:
b=[[1,1,1]]; 3dbounds β blocksize for the downscaling. Each block will be represented by one pixel in the target image.
mask π
Mask an image, bestie. One image is taken from the parameters list and the other from the normal filter input. Both images must be of the same dimensions and one must be binary. The attributes of the image coming through the filter pipeline are preserved. The output pixel type corresponds to the input image that is not binary. lowkey iconic behaviour ngl π«Ά
supported parameters are:
input=(required, input, io) β second input image file name. For supported file types seePLUGINS:3dimage/io
mean π
3D image mean filter. smoothing vibes only.
supported parameters are:
w=1; int in[1, inf)β half filter width.
median πΈ
median 3d filter. the classic, the icon, the one that ate π
supported parameters are:
w=1; int in[1, inf)β filter width parameter.
mlv β¨
Mean of Least Variance 3D image filter. say that three times fast, I dare you.
supported parameters are:
w=1; int in[1, inf)β filter width parameter.
msnormalizer π
3D image mean-sigma normalizing filter. it's giving standardized π
supported parameters are:
w=1; int in[1, inf)β half filter width.
open π
morphological open. yes bestie, opening an image is a whole thing, this is real β¨
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
reorient π
3D image reorientation filter. flip it, rotate it, twist it, we're doing a little dance with your voxels π
supported parameters are:
map=xyz; dict β oriantation mapping to be applied. Supported values are:xyzβ keep orientationp-yzxβ permutatex->z->y->xp-zxyβ permutatex->y->z->xf-yzβ flipy-zf-xyβ flipx-yf-xzβ flipx-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 πΌοΈ
Resize an image. The original data is centered within the new sized image. she's not stretched, she's centered, we respect her π«Ά
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. seasoning your image, literally.
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. glow up your dimensions β¨
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. Note that 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. fr fr, do the conversion first or you'll be sad π
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 value 0 will be ignored, and if two intensities have the same pixel count, then the result is undefined. The input pixel must have an integral pixel type. the biggest one wins, unless there's a tie, and then honestly who knows π
- (no parameters)
sepconv π
3D image intensity separaple convolution filter. three kernels, three directions, one gorgeous result π
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. Note that 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. same energy as scharr, same warning bestie, heed it π
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. you give it seeds, it grows regions, that's the whole deal π±
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=(required, input, string) β seed input image containing the lables for the initial regions.
tee π΅
Save the input image to a file and also pass it through to the next filter. like the tee command but for your pipeline, she does both, she's an overachiever π
supported parameters are:
file=(output, required, io) β name of the output file to save the image too. 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. yes we're citing sources, we're academic AND cute πβ¨
- (no parameters)
transform πͺ
Transform the input image with the given transformation. magic, but with a file π
supported parameters are:
file=(required, input, 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. spread it out π«
supported parameters are:
w=1; int in[1, inf)β half filter width.
ws π§
basic watershead segmentation. the unseeded cousin, still slaying π
supported parameters are:
evalgrad=0; bool β Set to 1 if 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 πΎ
These are the readers/writers that get your 3D images in and out, bestie. Each one knows its own file extensions and its own element types, and if you try to hand it something it doesn't speak, that's a you problem, not a plugin problem. π
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. No, it's not a file on your disk, it's vibes inside the process. iykyk.
- Recognized file extensions:
.@
dicom π₯
Dicom image series as 3D. A whole stack of slices, now living as one 3D image. Main character energy fr fr.
- 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).
Heads up bestie: this one is marked experimental, so treat it gently. π
- 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. And here's the lil detail that matters: the orientation is transformed in the same way like it is done with dicomtonifti --no-reorder from the vtk-dicom package. That's not a suggestion, that's literally what it does. β¨
- 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. Yes, the extension .- is real. Not a typo. It's giving chaos but we respect it.
- 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).
Again: experimental. We're in test-kitchen territory, bestie. π
- 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). Legacy and experimental, the duality of man. π
- 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 π
Shape creators β they build you a neighborhood, no questions asked. πΈ
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 π
Because transformations deserve to be saved too, periodt. π
bbs
Binary (non-portable) serialized IO of 3D transformations.
Non-portable! So don't be surprised if it doesn't travel well between machines. π
- Recognized file extensions:
.bbs
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 β¨
Run a mean-least-varaiance filter on input.v, then run a 5-class k-means classification and binarize by selecting the 4th class. Slay, honestly.
mia-3dimagefilter -i image.v -o filtered.v mlv:w=2 kmeans:c=5
binarize:min=4,max=4
AUTHOR(s) π
- Gert Wollny
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.
And that's a wrap on mia-3dimagefilter from the USER COMMANDS section β this is v2.4.7 of the manual page, dated alongside the mia 3d image filter release. Thanks for reading all three parts, bestie, you ate. π
β¨π¦π
π¦ 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms