mia-2dseri...ordermedian(1)

πŸ“¦
version 2.4.7 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ mia-2dseries2dordermedian β€” the manual πŸ’…

okay bestie, welcome to mia-2dseries2dordermedian(1) πŸ’– this is the General Commands Manual page, and it's a whole saga, so buckle up.


🌸 NAME 🌸

mia-2dseries2dordermedian β€” Evaluate time-intensity median 2nd order derivative of a series.

like. the whole job. right there. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

mia-2dseries2dordermedian -i <in-file> -o <out-file> [options]
<PLUGINS:2dimage/filter>

πŸ’– DESCRIPTION πŸ’–

mia-2dseries2dordermedian evaluates the pixel-wise median of the absolute values of the gauss filtered 2nd order temporal derivative of a series of images. no cap, that's the whole plot. πŸŽ€

and that's not even it β€” you can also use it to output the time-intensity curve of a given pixel. very main character of it tbh.

plus, the program supports slice-wise spacial pre-filtering β€” you get that by handing it additional filters as free parameters (filter/2dimage). 🫢


✨ OPTIONS ✨

  • -i, --in-file=(input, required); string β€” the input segmentation set. required, so like, don't skip it bestie.
  • -o, --out-file=(output, required); io β€” the output image name. also required. for supported file types see PLUGINS:2dimage/io.
  • -k, --skip=0 β€” skip files at the beginning.
  • -e, --enlarge-boundary=5 β€” enlarge the cropbox by this many pixels.
  • -c, --crop β€” crop the image before running the statistics.
  • -g, --gauss=1 β€” gauss filter width for smoothing the gradient.
  • --itc-file= β€” intensity time curve output file.
  • --itc-loc=[0,0] β€” intensity time curve output pixel coordinates.

πŸ’¬ Help & Info πŸ’¬

  • -V, --verbose=warning β€” how chatty the output is. it prints messages of the given level and every higher priority. the 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 β€” prints the copyright information.
  • -h, --help β€” prints this help.
  • -?, --usage β€” prints a short help.
  • --version β€” prints the version number and exits.

βš™οΈ Processing βš™οΈ

  • --threads=-1 β€” maximum number of threads to use for processing. this number should be lower than or equal to the number of logical processor cores on your machine. (-1 means 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/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: 2dimage/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: 2dimage/filter πŸ‘‘

heads up bestie, this is the big one. it's giving options for days. πŸ”₯
  • adaptmed β€” 2D image adaptive median filter. supported parameters are:
    • w = 2; int in [1, inf) β€” half filter width.
  • admean β€” an adaptive mean filter that works like a normal mean filter if the intensity variation within the filter mask is lower than the intensity variation in the whole image; it uses a special formula if the local variation is higher than the image intensity variation. supported parameters are:
    • w = 1; int in [1, inf) β€” half filter width.
  • aniso β€” 2D anisotropic image filter. supported parameters are:
    • epsilon = 1; float in (0, inf) β€” iteration change threshold.
    • iter = 100; int in [1, 10000] β€” number of iterations.
    • k = -1; float in [0, 100] β€” k, the noise threshold (<=0 β†’ adaptive).
    • n = 8; set β€” neighbourhood. supported values are: ( 4, 8, )
    • psi = tuckey; dict β€” edge stopping function. supported values are:
      • tuckey β€” tukey stopping function
      • pm1 β€” stopping function 1
      • guess β€” test stopping function
      • pm2 β€” stopping function 2
  • 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; set β€” a hint at the main image content. supported values are: ( black, white, )
    • shape = [sphere:r=2]; factory β€” structuring element. for supported plug-ins see PLUGINS:2dimage/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 see PLUGINS:2dimage/io
    • op =(required, factory) β€” image combiner to be applied to the images. for supported plug-ins see PLUGINS:2dimage/combiner
    • reverse = 0; bool β€” reverse the order in which the images are 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. supported parameters are:
    • end = [[-1,-1]]; streamable β€” end of crop region.
    • start = [[0,0]]; streamable β€” start of crop region.
  • dilate β€” 2d image stack dilate filter. supported parameters are:
    • hint = black; set β€” a hint at the main image content. supported values are: ( black, white, )
    • shape = [sphere:r=2]; factory β€” structuring element. for supported plug-ins see PLUGINS:2dimage/shape
  • distance β€” 2D image distance filter; evaluates the distance map for a binary mask.
    • (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]]; 2dbounds β€” blocksize.
    • bx = 1; uint in [1, inf) β€” blocksize in x direction.
    • by = 1; uint in [1, inf) β€” blocksize in y 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 β€” 2d image stack erode filter. supported parameters are:
    • hint = black; set β€” a hint at the main image content. supported values are: ( black, white, )
    • shape = [sphere:r=2]; factory β€” structuring element. for supported plug-ins see PLUGINS:2dimage/shape
  • gauss β€” isotropic 2D gauss filter. supported parameters are:
    • w = 1; int in [0, inf) β€” filter width parameter.
  • gradnorm β€” 2D image to gradient norm filter. supported parameters are:
    • normalize = 0; bool β€” normalize the gradient norms to range [0,1].
  • invert β€” intensity invert filter.
    • (no parameters)
  • kmeans β€” 2D image k-means filter. in the output image, the pixel value represents the class membership and the class centers are stored as an attribute in the image. supported parameters are:
    • c = 3; int in [2, inf) β€” number of classes.
  • label β€” label connected components in a binary 2D image. supported parameters are:
ok so the page literally cuts off right there mid-sentence 😭 the label params (and everything after) are coming in part 2, bestie β€” we are so not done πŸ’…
  • n = 4n; factory β€” Neighborhood mask to describe connectivity. For supported plug-ins see PLUGINS:2dimage/shape 🌸
  • labelmap β€” Image filter to remap label id's. Only applicable to images with integer valued intensities/labels. Supported parameters are:
    • map =(input, required, string) β€” Label mapping file. πŸ’…
  • labelscale β€” A filter that only creates output voxels that are already created in the input image. 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. If the region comprises two labels with the same count, the one with the lower number wins. Supported parameters are:
    • out-size =(required, 2dbounds) β€” target size given as two comma separated values. ✨
  • load β€” Load the input image from a file and use it to replace the current image in the pipeline. Supported parameters are:
    • file =(input, required, io) β€” name of the input file to load from. For supported file types see PLUGINS:2dimage/io πŸ¦‹
  • mask β€” 2D masking, one of the two input images must by of type bit. Supported parameters are:
    • fill = min; dict β€” fill style for pixels outside of the mask. Supported values are:
      • min β€” set values outside the mask to the minimum value found in the image. πŸ“
      • zero β€” set the values outside the mask to zero. πŸ“
      • max β€” set the values outside the mask to the maximum value found in the image. πŸ“
    • input =(input, required, io) β€” second input image file name. For supported file types see PLUGINS:2dimage/io
    • inverse = 0; bool β€” set to true to use the inverse of the mask for masking. πŸ’œ
  • maxflow β€” This filter implements the uses the max-flow min-cut algorithm for image segmentation, supported parameters are:
    • sink-flow =(input, required, io) β€” Image of float type to define the per-pixel flow to the sink. For supported file types see PLUGINS:2dimage/io 🌊
    • source-flow =(input, required, io) β€” Image of float type to define the per-pixel flow to the source. For supported file types see PLUGINS:2dimage/io 🌊
  • mean β€” 2D image mean filter, supported parameters are:
    • w = 1; int in [1, inf) β€” half filter width. πŸ‘‘
  • meanvar β€” Filter that evaluates simultaneously the pixel wise mean and the variance of an image in a given window. Pixel intensities below the given threshold will be ignored and at their locations the output mean and variation are set to zero. The mean intensity image is directly passed as float image to the pipeline, the variation image is saved to a file given with the varfile parameter. Supported parameters are:
    • thresh = 0; double in [0, inf) β€” Intensity thresholding parameter: Pixels with intensities below this threshold will be set to zero, and also not used when evaluating mean and variation.
    • varfile =(output, required, io) β€” name of the output file to save the variation image too. For supported file types see PLUGINS:2dimage/io
    • w = 1; uint in [1, inf) β€” filter width parameter. πŸ’–
  • median β€” 2D image median filter, supported parameters are:
    • w = 1; int in [1, inf) β€” half filter width. πŸŽ€
  • medianmad β€” Filter that evaluates simultaneously the pixel wise median and the median absolute deviation (MAD) of an image in a given window. Pixel intensities below the given threshold will be ignored and at their locations the output median and MAD are set to zero. The median intensity image is directly passed to the pipeline, the variation image is saved to a file given with the varfile parameter. Both output images have the same pixel type like the input image. Supported parameters are:
    • madfile =(output, required, io) β€” name of the output file to save the median absolute deviation image too. For supported file types see PLUGINS:2dimage/io
    • thresh = 0; double in [0, inf) β€” Intensity thresholding parameter: Pixels with intensities below this threshold will be set to zero, and also not used when evaluating mean and variation.
    • w = 1; uint in [1, inf) β€” filter width parameter. 🌈
  • mlv β€” Mean of Least Variance 2D image filter, supported parameters are:
    • w = 1; int in [1, inf) β€” filter width parameter. 🧚
  • ngfnorm β€” 2D image to normalized-gradient-field-norm filter. (no parameters) πŸ’€
  • noise β€” 2D image noise filter: add additive or modulated noise to an image, supported parameters are:
    • g = [gauss:mu=0,sigma=10]; factory β€” noise generator. For supported plug-ins see PLUGINS:generator/noise
    • mod = 0; bool β€” additive or modulated noise. πŸ”Š
  • open β€” morphological open, supported parameters are:
    • hint = black; set β€” a hint at the main image content. Supported values are: ( black, white, )
    • shape = [sphere:r=2]; factory β€” structuring element. For supported plug-ins see PLUGINS:2dimage/shape 🫢
  • pruning β€” Morphological pruning. Pruning until convergence will erase all pixels but closed loops. Supported parameters are:
    • iter = 0; int in [1, 1000000] β€” Number of iterations to run, 0=until convergence. βœ‚οΈ
  • regiongrow β€” Region growing starting from a seed until only along increasing gradients, supported parameters are:
    • n = 8n; factory β€” Neighborhood shape. For supported plug-ins see PLUGINS:2dimage/shape
    • seed =(input, required, io) β€” seed image (bit valued). For supported file types see PLUGINS:2dimage/io 🌱
  • sandp β€” salt and pepper 3d filter, supported parameters are:
    • thresh = 100; float in (0, inf) β€” thresh value.
    • w = 1; int in [1, inf) β€” filter width parameter. πŸ§‚
  • scale β€” 2D image downscale filter, supported parameters are:
    • interp = [bspline:d=3]; factory β€” interpolation method to be used. For supported plug-ins see PLUGINS:1d/splinekernel
    • s = [[0,0]]; 2dbounds β€” target size as 2D vector.
    • sx = 0; uint in [0, inf) β€” target size in x direction, 0: use input size.
    • sy = 0; uint in [0, inf) β€” target size in y direction, 0: use input size. πŸ“
  • selectbig β€” 2D label select biggest component filter. (no parameters) πŸ†
  • sepconv β€” 2D image intensity separable convolution filter, 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 πŸŒ€
  • shmean β€” 2D image filter that evaluates the mean over a given neighborhood shape, supported parameters are:
    • shape = 8n; factory β€” neighborhood shape to evaluate the mean. For supported plug-ins see PLUGINS:2dimage/shape 🌸
  • 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. Supported parameters are:
    • dir = x; dict β€” Gradient direction. Supported values are:
      • x β€” gradient in x-direction
      • y β€” gradient in y-direction 🧭
  • sort-label β€” This plug-in sorts the labels of a gray-scale image so that the lowest label value corresponds to the label with the most pixels. The background (0) is not touched. (no parameters) πŸ”’
  • sws β€” seeded watershed. The algorithm extracts exactly so many regions as initial labels are given in the seed image. 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 watershed region growing. For supported plug-ins see PLUGINS:2dimage/shape
    • seed =(input, required, string) β€” seed input image containing the labels for the initial regions. πŸ’§
  • tee β€” Save the input image to a file and also pass it through to the next filter, supported parameters are:
    • file =(output, required, io) β€” name of the output file to save the image too. For supported file types see PLUGINS:2dimage/io πŸ«–
  • thinning β€” Morphological thinning. Thinning until convergence will result in a 8-connected skeleton. Supported parameters are:
    • iter = 0; int in [1, 1000000] β€” Number of iterations to run, 0=until convergence. 🦴
  • thresh β€” This filter sets all pixels of an image to zero that fall below a certain threshold and whose neighbours in a given neighborhood shape also fall below a this threshold, supported parameters are:
    • shape = 4n; factory β€” neighborhood shape to take into account. For supported plug-ins see PLUGINS:2dimage/shape
    • thresh = 5; double β€” The threshold value. ⚑

tmean β€” 2D image thresholded tmean filter 🫢 The way this one works: your output pixel value is 0 if the input pixel value is below the threshold you gave, otherwise the pixels in the evaluation windows only get considered if the input pixel intensity is above that threshold. Very "if you're not on the list, you're not coming in" energy. Params it fw:

  • t = 0; float β€” threshold for pixels not to take into account.
  • w = 1; int in [1, inf) β€” half filter width.

transform β€” transforms the input image with the transformation you hand it πŸ’«

  • file =(input, required, io) β€” name of the file containing the transformation. For supported file types see PLUGINS:2dtransform/io.

ws β€” basic watershead segmentation (yes bestie, spelled exactly like that, we adore her) 🌊

  • 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:2dimage/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: 2dimage/io ✨

Your image-reading-and-writing besties. What format, what pixels, no cap:

  • bmp β€” BMP 2D-image input/output support. Reads and writes 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
  • datapool β€” virtual IO to and from the internal data pool πŸ«™
    • Recognized file extensions: .@
  • dicom β€” 2D image io for DICOM 🩻
    • Recognized file extensions: .DCM, .dcm
    • Supported element types: signed 16 bit, unsigned 16 bit
  • exr β€” a 2dimage io plugin for OpenEXR images πŸ”₯
    • Recognized file extensions: .EXR, .exr
    • Supported element types: unsigned 32 bit, floating point 32 bit
  • jpg β€” a 2dimage io plugin for jpeg gray scale images πŸ“·
    • Recognized file extensions: .JPEG, .JPG, .jpeg, .jpg
    • Supported element types: unsigned 8 bit
  • png β€” a 2dimage io plugin for png images πŸ¦‹
    • Recognized file extensions: .PNG, .png
    • Supported element types: binary data, unsigned 8 bit, unsigned 16 bit
  • raw β€” RAW 2D-image output support πŸ’€ (output only, don't come for me)
    • 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
  • 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
  • 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

🧚 PLUGINS: 2dimage/shape πŸ’œ

Shapes = the neighborhoods and masks. Pick your vibe:

  • 1n β€” a shape that only contains the central point. Just the one pixel. Minimalist queen πŸ‘‘
    • (no parameters)
  • 4n β€” 4n neighborhood 2D shape
    • (no parameters)
  • 8n β€” 8n neighborhood 2D shape
    • (no parameters)
  • rectangle β€” rectangle shape mask creator. Params bestie:
    • fill = 1; bool β€” create a filled shape.
    • height = 2; int in [1, inf) β€” height of rectangle.
    • width = 2; int in [1, inf) β€” width of rectangle.
  • sphere β€” closed spherical neighborhood shape of radius r. 🫧
    • r = 2; float in (0, inf) β€” sphere radius.
  • square β€” square shape mask creator. Params:
    • fill = 1; bool β€” create a filled shape.
    • width = 2; int in [1, inf) β€” width of rectangle.
not me clocking that square describes width as "width of rectangle" 😭 that's just what the page says, keeping it 100% real.

🌈 PLUGINS: 2dtransform/io πŸŽ€

Reading and writing those 2D transformations, format by format:

  • bbs β€” Binary (non-portable) serialized IO of 2D transformations
    • Recognized file extensions: .bbs
  • datapool β€” virtual IO to and from the internal data pool πŸ«™
    • Recognized file extensions: .@
  • vista β€” Vista storage of 2D transformations ✨
    • Recognized file extensions: .v2dt
  • xml β€” XML serialized IO of 2D transformations πŸ“œ
    • Recognized file extensions: .x2dt

πŸŒ€ PLUGINS: generator/noise πŸ“

Noise generators, aka chaos but make it statistical:

  • gauss β€” this noise generator creates random values that are distributed according to a Gaussien distribution by using the Box-Muller transformation. πŸ‘‘ Params:
    • mu = 0; float β€” mean of distribution.
    • seed = 0; uint in [0, inf) β€” set random seed (0 = init based on system time).
    • sigma = 1; float in (0, inf) β€” standard derivation of distribution.
  • uniform β€” uniform noise generator using C stdlib rand(). Params:
    • a = 0; float β€” lower bound if noise range.
    • b = 1; float β€” higher bound if noise range.
    • seed = 0; uint in [0, inf) β€” set random seed (0 = init based on system time).

πŸ’– EXAMPLE πŸ’–

Okay so the actual assignment: evaluate the median of the 2nd order derivative of the series given in segmentation set segment.set after filtering with a Gaussian of width 3. And btw also write the time intensity curve of pixel <128,64> to curve.txt. Slay.

mia-2dseries2dordermedian -i segment.set -o gradmedian.exr -g 1
       --itc-file curve.txt --itc-loc "<128,64>"

πŸ‘‘ 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, bestie 🫢 this page is from the USER COMMANDS section of the manual, version v2.4.7, dated 1999‐2015, and it goes by the name mia-2dseri...ordermedian(1) β€” the truncated names are giving "character limit ate my homework" but the Unix is real, iykyk. Go run it, the medians are medianing πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from