mia-3dimagefilter(1)

πŸ“¦
version 2.4.7 Β· 3 versions
, in debian bookworm, ubuntu noble

✨ 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 at PLUGINS:3dimage/io.
  • -o, --out-file=(output, required); io β€” the output image(s) that have been filtered. for supported file types, again, see PLUGINS: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 trace
    • debug β€” Debug output
    • info β€” Low level messages
    • message β€” Normal messages
    • warning β€” Warnings
    • fail β€” Report test failures
    • error β€” Report errors
    • fatal β€” 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 see PLUGINS: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 =(required, input, io) β€” second image that is needed in the combiner. for supported file types see PLUGINS:3dimage/io.
    • op =(required, factory) β€” Image combiner to be applied to the images. for supported plug-ins see PLUGINS: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 converting
      • linear β€” apply linear transformation x -> a*x+b
      • range β€” apply linear transformation that maps the input data type range to the output data type range
      • opt β€” apply a linear transformation that maps the real input range to the full output range
      • optstat β€” 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 data
      • sbyte β€” signed 8 bit
      • ubyte β€” unsigned 8 bit
      • sshort β€” signed 16 bit
      • ushort β€” unsigned 16 bit
      • sint β€” signed 32 bit
      • uint β€” unsigned 32 bit
      • slong β€” signed 64 bit
      • ulong β€” unsigned 64 bit
      • float β€” floating point 32 bit
      • double β€” floating point 64 bit
      • none β€” 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 see PLUGINS: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 see PLUGINS: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 see PLUGINS: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 see PLUGINS:3dimage/io.
    • shape = 6n; factory β€” neighborhood mask. for supported plug-ins see PLUGINS: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 see PLUGINS: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 see PLUGINS: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 see PLUGINS: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 see PLUGINS: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 see PLUGINS: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 orientation
    • p-yzx ‐ permutate x->z->y->x
    • p-zxy ‐ permutate x->y->z->x
    • f-yz ‐ flip y-z
    • f-xy ‐ flip x-y
    • f-xz ‐ flip x-z
    • r-x90 ‐ rotate around x-axis clockwise 90 degree
    • r-x180 ‐ rotate around x-axis clockwise 180 degree
    • r-x270 ‐ rotate around x-axis clockwise 270 degree
    • r-y90 ‐ rotate around y-axis clockwise 90 degree
    • r-y180 ‐ rotate around y-axis clockwise 180 degree
    • r-y270 ‐ rotate around y-axis clockwise 270 degree
    • r-z90 ‐ rotate around z-axis clockwise 90 degree
    • r-z180 ‐ rotate around z-axis clockwise 180 degree
    • r-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 see PLUGINS:1d/splinekernel
  • s = [[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-direction
    • y ‐ gradient in y-direction
    • z ‐ 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 see PLUGINS:1d/spacialkernel
  • ky = [gauss:w=1]; factory β€” filter kernel in y-direction. For supported plug-ins see PLUGINS:1d/spacialkernel
  • kz = [gauss:w=1]; factory β€” filter kernel in z-direction. For supported plug-ins see PLUGINS: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-direction
    • y ‐ gradient in y-direction
    • z ‐ 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 see PLUGINS:3dimage/shape
  • seed =(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 see PLUGINS: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 see PLUGINS:3dtransform/io
  • imgboundary = ; factory β€” override image interpolation boundary conditions. For supported plug-ins see PLUGINS:1d/splinebc
  • imgkernel = ; factory β€” override image interpolator kernel. For supported plug-ins see PLUGINS: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 see PLUGINS:3dimage/shape
  • thresh = 0; float in [0, 1) β€” Relative gradient norm threshold. The actual value threshold value is thresh * (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

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