mia-3dcost...nslatedgrad(1)

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

πŸ’– NAME πŸ’–

okay bestie, welcome to the glow-up era of mia-3dcost-translatedgrad β€” she lives on the mia-3dcost...nslatedgrad(1) manual page (yes the header truncates her name, she's that iconic, she contains multitudes πŸ’…).

Her whole thing? Evaluate the cost gradient between two images and convert it to a spline representation. That's the vibe. ✨


πŸŽ€ SYNOPSIS πŸŽ€

mia-3dcost-translatedgrad -i <in-file> -r <ref-file> -o <out-file>
[options]

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, mia-3dcost-translatedgrad evaluates the cost gradient between two images, and then it evaluates the transformation related gradient for it based on whatever transformation model you hand it. two images go in, gradient energy comes out. no cap. πŸ”₯


🌸 OPTIONS 🌸

  • -i, --in-file=(required, input); io β€” the input image, babes. For supported file types see PLUGINS:3dimage/io
  • -r, --ref-file=(required, input); io β€” the reference image, the one we're comparing against. For supported file types see PLUGINS:3dimage/io
  • -o, --out-file=(output, required); io β€” the output vector field. For supported file types see PLUGINS:3dtransform/io
  • -g, --gradimg-file=(output); io β€” norm image of the spline transformed gradient. For supported file types see PLUGINS:3dimage/io
  • -C, --cost-gradimg-file=(output); io β€” norm image of the cost gradient. For supported file types see PLUGINS:3dimage/io
  • -f, --transForm=spline:rate=5 β€” the transformation that the gradient relates to. For supported plugins see PLUGINS:3dimage/transform
  • -c, --cost=ssd β€” which cost function to use. For supported plugins see PLUGINS:3dimage/cost

Help & Info 🫢

  • -V, --verbose=warning β€” how chatty the output is; it 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 β€” Maximum 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). let her cook on all cores bestie ✨

🌈 PLUGINS: 1d/splinebc 🌈

mirror

Spline interpolation boundary conditions that mirror on the boundary.

(no parameters) β€” a whole mood, zero config

repeat

Spline interpolation boundary conditions that repeats the value at the boundary.

(no parameters)

zero

Spline interpolation boundary conditions that assumes zero for values outside.

(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: 3dimage/cost πŸ‘‘

lncc

local normalized cross correlation with masking support., supported parameters are:

  • w = 5; uint in [1, 256] β€” half width of the window used for evaluating the localized cross correlation.

mi

Spline parzen based mutual information., supported parameters are:

  • cut = 0; float in [0, 40] β€” Percentage of pixels to cut at high and low intensities to remove outliers.
  • mbins = 64; uint in [1, 256] β€” Number of histogram bins used for the moving image.
  • mkernel = [bspline:d=3]; factory β€” Spline kernel for moving image parzen hinstogram. For supported plug-ins see PLUGINS:1d/splinekernel
  • rbins = 64; uint in [1, 256] β€” Number of histogram bins used for the reference image.
  • rkernel = [bspline:d=0]; factory β€” Spline kernel for reference image parzen hinstogram. For supported plug-ins see PLUGINS:1d/splinekernel

ncc

normalized cross correlation.

(no parameters)

ngf

This function evaluates the image similarity based on normalized gradient fields. Given normalized gradient fields $ _S$ of the src image and $ _R$ of the ref image various evaluators are implemented., supported parameters are:

  • eval = ds; dict β€” plugin subtype (sq, ds,dot,cross). Supported values are:
    • ds ‐ square of scaled difference
    • dot ‐ scalar product kernel
    • cross ‐ cross product kernel

ssd

3D image cost: sum of squared differences, supported parameters are:

  • autothresh = 0; float in [0, 1000] β€” Use automatic masking of the moving image by only takeing intensity values into accound that are larger than the given threshold.
  • norm = 0; bool β€” Set whether the metric should be normalized by the number of image pixels.

ssd-automask

3D image cost: sum of squared differences, with automasking based on given thresholds, supported parameters are:

  • rthresh = 0; double β€” Threshold intensity value for reference image.
  • sthresh = 0; double β€” Threshold intensity value for source image.

πŸ¦‹ PLUGINS: 3dimage/io πŸ¦‹

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

okay and that's literally only the first half bestie, there's more where this came from πŸ‘€

πŸ’« affine β€” the 12-degrees-of-freedom glow-up

Affine transformation, and yes bestie, that's a whole 12 degrees of freedom to play with. Supported parameters are:

  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Wanna know which plug-ins are allowed here? Go peek at PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” the image interpolator kernel. Supported plug-ins live at PLUGINS:1d/splinekernel.

πŸŒ€ axisrot β€” rotation but make it restricted

Restricted rotation transformation (1 degree of freedom only, we're being picky). The transformation is locked to rotation around the given axis, about the given rotation center. Supported parameters are:

  • axis =(required, 3dfvector) β€” the rotation axis. Required, so don't ghost it.
  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • origin =(required, 3dfvector) β€” center of the transformation. Also required.

✨ raffine β€” restricted affine, 3 degrees of freedom

Restricted affine transformation (3 degrees of freedom). It's confined to rotation around the given axis plus shearing along the two axes perpendicular to that given one. Supported parameters are:

  • axis =(required, 3dfvector) β€” rotation axis.
  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • origin =(required, 3dfvector) β€” center of the transformation.

πŸ¦‹ rigid β€” rotation + translation, six degrees of freedom

Rigid transformation, meaning rotation and translation (six degrees of freedom). Supported parameters are:

  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • origin = [[0,0,0]]; 3dfvector β€” relative rotation center, i.e. <0.5,0.5,0.5> corresponds to the center of the volume. Default is [0,0,0].

🌸 rotation β€” just rotation, three degrees of freedom

Rotation transformation (three degrees of freedom). Supported parameters are:

  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • origin = [[0,0,0]]; 3dfvector β€” relative rotation center, i.e. <0.5,0.5,0.5> corresponds to the center of the volume. Default [0,0,0].

πŸŽ€ rotbend β€” the bendy one, 4 degrees of freedom

Restricted transformation (4 degrees of freedom). It's restricted to rotation around the x and y axes plus a bending along the x axis, independent in each direction, with the bending increasing with the squared distance from the rotation axis. Supported parameters are:

  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • norot = 0; bool β€” don't optimize the rotation.
  • origin =(required, 3dfvector) β€” center of the transformation.

🧚 spline β€” free-form, the main character

Free-form transformation that can be described by a set of B-spline coefficients plus an underlying B-spline kernel. Supported parameters are:

  • anisorate = [[0,0,0]]; 3dfvector β€” anisotropic coefficient rate in pixels; nonpositive values will be overwritten by the rate value. Default [0,0,0].
  • debug = 0; bool β€” enable additional debugging output.
  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • kernel = [bspline:d=3]; factory β€” transformation spline kernel. Supported plug-ins: PLUGINS:1d/splinekernel.
  • penalty = ; factory β€” transformation penalty energy term. Supported plug-ins: PLUGINS:3dtransform/splinepenalty. (Note the empty default, no cap.)
  • rate = 10; float in [1, inf) β€” isotropic coefficient rate in pixels. Defaults to 10, and it must be >= 1.

πŸ’œ translate β€” the classic, three degrees of freedom

Translation (three degrees of freedom). Supported parameters are:

  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.

🌈 vf β€” a translation for every point

This plug-in implements a transformation that defines a translation for each point of the grid defining the domain of the transformation. Supported parameters are:

  • imgboundary = mirror; factory β€” image interpolation boundary conditions. Supported plug-ins: PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory β€” image interpolator kernel. Supported plug-ins: PLUGINS:1d/splinekernel.

πŸ’Ύ PLUGINS: 3dtransform/io

The file-format girlies. Every one of them knows its own extensions, iykyk:

  • bbs β€” Binary (non-portable) serialized IO of 3D transformations.
    • Recognized file extensions: .bbs
  • datapool β€” Virtual IO to and from the internal data pool.
    • Recognized file extensions: .@
  • vista β€” Vista storage of 3D transformations.
    • Recognized file extensions: .v, .v3dt
  • xml β€” XML serialized IO of 3D transformations.
    • Recognized file extensions: .x3dt

βš–οΈ PLUGINS: 3dtransform/splinepenalty

divcurl β€” the penalty plug-in

divcurl penalty on the transformation. Supported parameters are:

  • curl = 1; float in [0, inf) β€” penalty weight on curl.
  • div = 1; float in [0, inf) β€” penalty weight on divergence.
  • norm = 0; bool β€” set to 1 if the penalty should be normalized with respect to the image size.
  • weight = 1; float in (0, inf) β€” weight of penalty energy. Note that this one's open interval, so strictly greater than zero, bestie.

πŸ”₯ EXAMPLE

Evaluate the SSD cost between src.v and ref.v and store the gradient gradient corresponding to a spline transformation in grad.v3dt.

mia-3dcost-translatedgrad -i src.v -o grad.v3dt -f spline:rate=8 -c ssd

πŸ‘‘ 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 πŸ’…πŸ«Ά This one's from v2.4.7 of the User Commands manual β€” go forth and transform some volumes, you've got this fr fr πŸ’–βœ¨

πŸ“¦ where this page comes from