mia-2dsegment-fuzzyw(1)

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

✨ mia-2dsegment-fuzzyw(1) ✨

hey bestie πŸ’– welcome to the General Commands Manual page for mia-2dsegment-fuzzyw(1). It's giving segmentation, it's giving fuzzy c-means, and it's literally all here. No cap.

NAME

mia-2dsegment-fuzzyw β€” Run a fuzzy c-means segmentation of a 2D image.

SYNOPSIS

mia-2dsegment-fuzzyw -i <in-file> [options]

DESCRIPTION

mia-2dsegment-fuzzyw This program is a implementation of a fuzzy c-means segmentation algorithm. πŸ¦‹

OPTIONS

πŸŽ€ File I/O πŸŽ€

  • -i, --in-file β€” (required, input); io β€” image to be segmented. For supported file types see PLUGINS:2dimage/io
  • -c, --cls-file β€” (output); io β€” class probability images, the image type must support multiple images and floating point values. For supported file types see PLUGINS:2dimage/io
  • -o, --out-file β€” (output); io β€” B-field corrected image. For supported file types see PLUGINS:2dimage/io
  • -g, --gain-log-file β€” (output); io β€” Logarithmic gain field, the image type must support floating point values. For supported file types see PLUGINS:2dimage/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 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
  • -h, --help β€” print this help
  • -?, --usage β€” print a short help
  • --version β€” print the version number and exit

🌈 Processing 🌈

  • --threads β€” -1 β€” Maxiumum 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).

πŸ“ Segmentation parameters πŸ“

  • -n, --no-of-classes β€” 3 β€” number of classes to segment
  • -C, --class-centres β€” (empty default) β€” initial class centers
  • -N, --neighborhood β€” shmean:shape=8n β€” neighborhood filter for B-field correction. For supported plugins see PLUGINS:2dimage/filter
  • -a, --alpha β€” 0.7 β€” weight of neighborhood filter for B-field correction
  • -p, --fuzziness β€” 2 β€” parameter describing the fuzzyness of mattar distinction
  • -e, --epsilon β€” 0.01 β€” Stopping criterion for class center 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 πŸ”₯

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 then the intensity variation in the whole image, that the uses a special formula if the local variation is higher then 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:
    • pm1 β€” stopping function 1
    • pm2 β€” stopping function 2
    • tuckey β€” tukey stopping function
    • guess β€” test stopping function

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 =(required, input, 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 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, bestie. In the output image the pixel value is literally the class membership, and the class centers get stored as an attribute on the image. Parameters it supports:

  • c = 3; int in [2, inf) β€” number of classes.

🌸 label

Labels connected components in a binary 2D image. Parameters it supports:

  • n = 4n; factory β€” neighborhood mask that describes connectivity. For supported plug-ins see PLUGINS:2dimage/shape

πŸ’œ labelmap

An image filter that remaps label id's. Only applicable to images with integer-valued intensities/labels, okay? Parameters it supports:

  • map =(required, input, string) β€” label mapping file.

πŸ¦‹ labelscale

A filter that only creates output voxels that are already created in the input image, no cap. 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 that region has two labels with the same count? The one with the lower number wins. Periodt. Parameters it supports:

  • out-size =(required, 2dbounds) β€” target size given as two comma separated values.

⭐ load

Loads the input image from a file and uses it to replace the current image in the pipeline. Parameters it supports:

  • file =(required, input, io) β€” name of the input file to load from. For supported file types see PLUGINS:2dimage/io

πŸ’… mask

2D masking β€” and heads up, one of the two input images must be of type bit. Parameters it supports:

  • 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 =(required, input, 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 max-flow min-cut algorithm for image segmentation. Parameters it supports:

  • sink-flow =(required, input, io) β€” image of float type to define the per-pixel flow to the sink. For supported file types see PLUGINS:2dimage/io
  • source-flow =(required, input, 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, so smooth. Parameters it supports:

  • w = 1; int in [1, inf) β€” half filter width.

🫢 meanvar

A filter that evaluates the pixel-wise mean and the variance of an image at the same time, inside a given window. Pixel intensities below the given threshold get ignored, and at their locations the output mean and variation are set to zero. The mean intensity image is passed directly as a float image to the pipeline, and the variation image gets saved to a file given with the varfile parameter. Parameters it supports:

  • thresh = 0; double in [0, inf) β€” intensity thresholding parameter: pixels with intensities below this threshold get set to zero, and also aren't used when evaluating mean and variation.
  • varfile =(required, output, io) β€” name of the output file to save the variation image to. For supported file types see PLUGINS:2dimage/io
  • w = 1; uint in [1, inf) β€” filter width parameter.

πŸ“ median

2D image median filter. Parameters it supports:

  • w = 1; int in [1, inf) β€” half filter width.

πŸ’– medianmad

A filter that evaluates the pixel-wise median and the median absolute deviation (MAD) of an image at the same time, in a given window. Pixel intensities below the given threshold get ignored, and at their locations the output median and MAD are set to zero. The median intensity image is passed directly to the pipeline, and the variation image is saved to a file given with the varfile parameter. Both output images have the same pixel type as the input image. Parameters it supports:

  • madfile =(required, output, io) β€” name of the output file to save the median absolute deviation image to. For supported file types see PLUGINS:2dimage/io
  • thresh = 0; double in [0, inf) β€” intensity thresholding parameter: pixels with intensities below this threshold get set to zero, and also aren't used when evaluating mean and variation.
  • w = 1; uint in [1, inf) β€” filter width parameter.

🧚 mlv

Mean of Least Variance 2D image filter. Parameters it supports:

  • 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: adds additive or modulated noise to an image. Parameters it supports:

  • 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. Parameters it supports:

  • 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. And listen β€” pruning until convergence will erase all pixels except closed loops. Parameters it supports:

  • iter = 0; int in [1, 1000000] β€” number of iterations to run, 0=until convergence.

πŸ¦‹ regiongrow

Region growing, starting from a seed and going until only along increasing gradients. Parameters it supports:

  • n = 8n; factory β€” neighborhood shape. For supported plug-ins see PLUGINS:2dimage/shape
  • seed =(required, input, io) β€” seed image (bit valued). For supported file types see PLUGINS:2dimage/io

πŸŽ€ sandp

Salt and pepper 3d filter. Parameters it supports:

  • thresh = 100; float in (0, inf) β€” thresh value.
  • w = 1; int in [1, inf) β€” filter width parameter.

⭐ scale

2D image downscale filter. Parameters it supports:

  • 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. Parameters it supports:

  • 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. Parameters it supports:

  • 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. Real talk 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. Parameters it supports:

  • 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. And the background (0) is not touched.

  • (no parameters)

πŸ’– sws

Seeded watershed. The algorithm extracts exactly as many regions as initial labels are given in the seed image. Parameters it supports:

  • 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 =(required, input, 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. Parameters it supports:

  • file =(required, output, io) β€” name of the output file to save the image to. For supported file types see PLUGINS:2dimage/io

πŸ’œ thinning

Morphological thinning. Thinning until convergence will result in an 8-connected skeleton. Parameters it supports:

  • iter = 0; int in [1, 1000000] β€” number of iterations to run, 0=until convergence.
  • thresh β€” bestie this one is the zero-out filter πŸ’€ it takes every pixel that's below a threshold and whose neighbours in a given neighborhood shape are also below that threshold, and sets them all to zero. supported parameters are:
    • shape = 4n; factory β€” the neighborhood shape we're taking into account. for the plug-ins that work here, go peek at PLUGINS:2dimage/shape
    • thresh = 5; double β€” the threshold value, periodt.
  • tmean β€” 2D image thresholded tmean filter ✨ here's the tea: the output pixel value is zero if the input pixel value is below the given threshold, otherwise the pixels in the evaluation windows are only considered if the input pixel intensity is above the threshold. supported parameters are:
    • 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 given transformation πŸ¦‹ supported parameters are:
    • file =(required, input, io) β€” name of the file containing the transformation. for the file types that work, see PLUGINS:2dtransform/io
  • ws β€” basic watershead segmentation πŸ‘‘ (yes, that spelling, we're keeping it fr fr). 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 the plug-ins that work here 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 ✨

okay so this is the whole roster of image reading/writing plug-ins, and every one of them lists its recognized file extensions and the element types it handles. no skipping, we love a complete list πŸ’–

  • bmp β€” BMP 2D-image input/output support. the plug-in supports reading and writing of binary images and 8-bit gray scale images. read-only support is provided for 4-bit gray scale images. the color table is ignored and the pixel values are taken as literal gray scale values.
    • Recognized file extensions: .BMP, .bmp
    • Supported element types:
      • binary data, unsigned 8 bit
  • 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
    • 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 🌸

the shape plug-ins!! these decide what counts as a "neighbourhood", and lowkey they're the backbone of every filter up there πŸ’…

  • 1n β€” a shape that only contains the central point
    • (no parameters)
  • 4n β€” 4n neighborhood 2D shape
    • (no parameters)
  • 8n β€” 8n neighborhood 2D shape
    • (no parameters)
  • rectangle β€” rectangle shape mask creator, supported parameters are:
    • 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., supported parameters are:
    • r = 2; float in (0, inf) β€” sphere radius.
  • square β€” square shape mask creator, supported parameters are:
    • fill = 1; bool β€” create a filled shape.
    • width = 2; int in [1, inf) β€” width of rectangle.

πŸŽ€ PLUGINS: 2dtransform/io πŸŽ€

the file formats for saving and loading your 2D transformations, bestie πŸ¦‹

  • 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!! for when your image just needs a lil chaos 🌈

  • gauss β€” this noise generator creates random values that are distributed according to a Gaussien distribution by using the Box-Muller transformation., supported parameters are:
    • 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(), supported parameters are:
    • 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 run a 5-class segmentation over inpt image input.v and store the class probability images in cls.v. literally that simple:

mia-2dsegment-fuzzyw -i input.v -a 5 -o cls.v

πŸ‘‘ 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 the whole page bestie, we ate and left no crumbs πŸ’…βœ¨ this one's mia-2dsegment-fuzzyw(1) from the USER COMMANDS section, version v2.4.7, dated 1999‐2015 in the copyright β€” go run it, ily, bye πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from