mia-2dstac...-presegment(1)
π mia-2dstack-cmeans-presegment π
okay bestie, welcome to the glow-up of a manual page for mia-2dstack-cmeans-presegment, living its best life in section 1 of the General Commands Manual. it's giving "quietly doing the most" and honestly? we're obsessed. let's go β¨
πΈ NAME πΈ
mia-2dstack-cmeans-presegment β Pre-classify the input image series by using a c-means estimator π«Ά
π¦ SYNOPSIS π¦
mia-2dstack-cmeans-presegment -i <in-file> -o <out-mask> -L <label>
[options]
β¨ DESCRIPTION β¨
so here's the tea, bestie. mia-2dstack-cmeans-presegment does three things and it does them in order, no skipping the line:
- it first evaluates a sparse histogram of an input image series π
- then it runs a c-means classification over that histogram π₯
- and then it estimates the mask for one (given) class based on class probabilities π
β οΈ big one: This program accepts only images of eight or 16 bit integer pixels. that's the vibe check and you will be checked. π
π OPTIONS π
π File-IO
-i,--in-file=(input, required); ioβ input image(s) to be filtered. For supported file types seePLUGINS:2dimage/ioπ-p,--out-probmap=(output); stringβ Save probability map to this file πΊοΈ-t,--type=pngβ output file name type π·οΈ-o,--out-mask=(output, required); stringβ output file name base π―
π 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 π’
ποΈ Parameters
-T,--histogram-thresh=5; float in [0, 50]β Percent of the extrem parts of the histogram to be collapsed into the respective last histogram bin. π-C,--classes=kmeans:nc=3β C-means class initializer. For supported plugins seePLUGINS:1d/cmeansπ§-S,--seed-threshold=0.95; float in (0, 1)β Probability threshold value to consider a pixel as seed pixel. π±-L,--label=(required); int in [0, 10]β Class label to create the mask from π·οΈ
βοΈ 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). π§΅
π PLUGINS: 1d/cmeans π
β¨ even
C-Means initializer that sets the initial class centers as evenly distributed over [0,1], supported parameters are:
nc =(required, ulong)β Number of classes to use for the fuzzy-cmeans classification. π’
β¨ kmeans
C-Means initializer that sets the initial class centers by using a k-means classification, supported parameters are:
nc =(required, ulong)β Number of classes to use for the fuzzy-cmeans classification. π’
β¨ predefined
C-Means initializer that sets pre-defined values for the initial class centers, supported parameters are:
cc =(required, vdouble)β Initial class centers fuzzy-cmeans classification (normalized to range[0,1]). π―
πΌοΈ PLUGINS: 2dimage/io πΌοΈ
π 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
π§ͺ EXAMPLE π§ͺ
okay so imagine this: Run the program over images imageXXXX.png with the sparse histogram, threshold the lower 30% bins (if available), run cmeans with two classes on the non-zero pixels and then create the mask for class 1 as foregroundXXXX.png. iconic behaviour, no notes. π
mia-2dstack-cmeans-presegment -i imageXXXX.png -o foreground -t png
--histogram-tresh=30 --classes 2 --label 1
π«Ά yes, --histogram-tresh=30 is spelled exactly like that in the example. copy it as-is, bestie. don't be the one who "fixes" it. π
π 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.
aaaand that's the whole page, bestie π this was mia-2dstac...-presegment(1) from USER COMMANDS, v2.4.7, and yes we're still screaming about how much ground this little program covers. slay, run it responsibly, and hydrate π§β¨
π¦ where this page comes from
- ubuntu jammy: mia-tools 2.4.7-8ubuntu1 Β· GPL-3.0-or-later
- ubuntu noble: mia-tools 2.4.7-13build4 Β· GPL-3.0-or-later
- ubuntu resolute: mia-tools 2.4.7-18 Β· GPL-3.0-or-later
- ubuntu stonking: mia-tools 2.4.7-19build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms