mia-3ddistance-stats(1)
π mia-3ddistance-stats β NAME π
okay so bestie, meet mia-3ddistance-stats β she's the mia-3d girlie whose entire job is: evaluate distance statistics for two labeled images. that's the assignment, she ate, no notes π
(also hi, this is section 1 of the manual β General Commands territory, main character energy only π)
β¨ SYNOPSIS β¨
mia-3ddistance-stats -i <in-labels> -r <ref-labels> -o <out-file>
[options]
π¦ DESCRIPTION π¦
okay so here's the vibe: this program evaluates the distance between areas that carry the same label in two different images. you give it a test image and a reference image, it does the math, and it hands you back a csv file. that csv has the distances for every labeled coordinate in the test image, and it looks exactly like this:
label,n-samples,distance,distance,...
so it's literally <pink>label</pink>, then how many samples that label has, then a whole lil parade of distances. iconic. π
and because we love a follow-up, here's a simple R program that pulls some per-label stats out of that data:
args <- commandArgs(TRUE)
data <- read.csv(args[1], header=FALSE)
for ( i in 1:dim(data)[1] ) {
line <- data[i,]
label <- as.integer(line[1])
end_range <- 2 + as.numeric(line[2])
s <- as.numeric(line[3:end_range])
result <- sprintf("%d %8.4f %8.4f %8.4f %8.4f0
label, mean(s), sqrt(var(s)), median(s), max(s))
cat(result)
}
slay. copy it, run it, thank the R girlies later π
π₯ OPTIONS π₯
π File-IO π
-i,--in-labels=(required, input); ioβ the input label image. for the file types she can handle, go peek atPLUGINS:3dimage/iobelow π-r,--ref-labels=(required, input); ioβ the reference label image. same deal, supported file types live inPLUGINS:3dimage/io.-l,--label-map=(input); stringβ an optional mapping of label numbers. if your labels need a lil glow-up before matching, this is her.-o,--out-file=(required, output); stringβ the output file name where the distances get written. it's a csv file, with distances listed for each label. required, bestie, don't forget it π«Ά
π Help & Info π
-V,--verbose=warningβ how chatty do you want her? this sets the verbosity of output: she prints messages of the given level and higher priorities. the 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 π-h,--helpβ print this help-?,--usageβ print a short help--versionβ print the version number and exit
βοΈ Processing βοΈ
--threads=-1β the 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). so like, don't be greedy, she'll figure it out herself π§
π PLUGINS: 3dimage/io π
these are all the file formats she can read/write, no cap:
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
- Recognized file extensions:
.@
dicom β Dicom image series as 3D
- 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).
- 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.
the orientation is transformed in the same way like it is done with 'dicomtonifti --no-reorder' from the vtk-dicom package.
- 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
- 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).
- 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).
- 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
π EXAMPLE π
wanna evaluate the distances for each label hanging out in image.v against the corresponding labels in reference.v, and stash the result as a comma separated list of values, i.e. distances.csv? say less:
mia-3ddistance-stats -i image.v -r reference.v -o distances.csv
π 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'.
π¨ bestie, real talk: ABSOLUTELY NO WARRANTY. she is giving everything but she is not legally obligated to anything, ok? read the license, it's the whole vibe.
that's the whole page, and honestly? she ate π
kisses from the USER COMMANDS section, version v2.4.7 β go run her, bestie π«Άβ¨π
π¦ 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms