mia-3ddistance-stats(1)

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

πŸ’– 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 at PLUGINS:3dimage/io below πŸ‘‡
  • -r, --ref-labels =(required, input); io β€” the reference label image. same deal, supported file types live in PLUGINS: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 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 β€” 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


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