mia-3dcost...nslatedgrad(1)
π 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 seePLUGINS:3dimage/io-r,--ref-file=(required, input); ioβ the reference image, the one we're comparing against. For supported file types seePLUGINS:3dimage/io-o,--out-file=(output, required); ioβ the output vector field. For supported file types seePLUGINS:3dtransform/io-g,--gradimg-file=(output); ioβ norm image of the spline transformed gradient. For supported file types seePLUGINS:3dimage/io-C,--cost-gradimg-file=(output); ioβ norm image of the cost gradient. For supported file types seePLUGINS:3dimage/io-f,--transForm=spline:rate=5β the transformation that the gradient relates to. For supported plugins seePLUGINS:3dimage/transform-c,--cost=ssdβ which cost function to use. For supported plugins seePLUGINS: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 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β 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 seePLUGINS:1d/splinekernelrbins = 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 seePLUGINS: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 differencedotβ scalar product kernelcrossβ 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 theratevalue. 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 to10, 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
- Recognized file extensions:
datapoolβ Virtual IO to and from the internal data pool.- Recognized file extensions:
.@
- Recognized file extensions:
vistaβ Vista storage of 3D transformations.- Recognized file extensions:
.v,.v3dt
- Recognized file extensions:
xmlβ XML serialized IO of 3D transformations.- Recognized file extensions:
.x3dt
- Recognized file extensions:
βοΈ 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 to1if 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
π 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.
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
- debian bookworm: mia-tools 2.4.7-11+b1 Β· GPL-3.0-or-later
- ubuntu jammy: mia-tools 2.4.7-8ubuntu1 Β· 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