mia-3drigidreg(1)
โจ mia-3drigidreg(1) โจ
okay so bestie โ this is the General Commands Manual page for mia-3drigidreg, and it's giving linear registration of 3D images. ๐
๐ธ NAME ๐ธ
mia-3drigidreg โ Linear registration of 3D images. ๐
๐ฆ SYNOPSIS ๐ฆ
mia-3drigidreg -i <in-image> -r <ref-image> -o <out-image> [options]
๐ DESCRIPTION ๐
So mia-3drigidreg is literally the program that implements the registration of two gray scale 3D images. The transformation is not penalized, so you should only use translation, rigid, or affine transformations as target. And if you need nonrigid registration? Run mia-3dnonrigidreg instead. periodt. โจ
๐ OPTIONS ๐
๐ File I/O ๐
-i,--in-image=(input, required)โ test image ๐ For supported file types seePLUGINS:3dimage/io. (io)-r,--ref-image=(input, required)โ reference image ๐ธ For supported file types seePLUGINS:3dimage/io. (io)-o,--out-image=(output, required)โ registered output image ๐ For supported file types seePLUGINS:3dimage/io. (io)-t,--transformation=(output)โ transformation output file name ๐ฆ For supported file types seePLUGINS:3dtransform/io. (io)-c,--cost=ssdโ cost function. For supported plugins seePLUGINS:3dimage/cost.-l,--levels=3โ multigrid levels.-O,--optimizer=gsl:opt=simplex,step=1.0โ Optimizer used for minimization. For supported plugins seePLUGINS:minimizer/singlecost.-f,--transForm=rigidโ transformation type. For supported plugins seePLUGINS:3dimage/transform.
๐ธ 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 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โ 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). yes bestie, โMaxiumumโ is spelled like that in the original ๐
๐ PLUGINS: 1d/splinebc ๐
mirrorโ Spline interpolation boundary conditions that mirror on the boundary.- (no parameters)
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/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 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
- Recognized file extensions:
datapoolโ Virtual IO to and from the internal data pool- Recognized file extensions:
.@
- Recognized file extensions:
dicomโ Dicom image series as 3D- Recognized file extensions:
.DCM,.dcm - Supported element types:
signed 16 bit,unsigned 16 bit
- Recognized file extensions:
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
- Recognized file extensions:
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
- Recognized file extensions:
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
- Recognized file extensions:
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
- Recognized file extensions:
vffโ VFF Sun raster format- Recognized file extensions:
.VFF,.vff - Supported element types:
unsigned 8 bit,signed 16 bit
- Recognized file extensions:
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
- Recognized file extensions:
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
- Recognized file extensions:
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
- Recognized file extensions:
๐ PLUGINS: 3dimage/transform ๐
okay bestie, this is the fun one โ the whole point of the program, honestly. These plugins are the actual transformations, the glow-ups your image is about to get. Every single one of them is a "transformation plug-in", and they all speak the same two-parameter dialect when it comes to interpolation. So let's meet the cast ๐
affine ๐
Affine transformation (12 degrees of freedom). Yeah, twelve. Full send. Supported parameters are:
imgboundary = mirror; factoryโ image interpolation boundary conditions. Curious which plug-ins you can slot in here? Go peep PLUGINS:1d/splinebc ๐ฆimgkernel = [bspline:d=3]; factoryโ image interpolator kernel. Supported plug-ins live in PLUGINS:1d/splinekernel โจ
axisrot ๐
Restricted rotation transformation (1 degrees of freedom). Not the whole shebang โ the transformation is locked to rotation around the given axis, about the given rotation center. 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.
raffine ๐ธ
Restricted affine transformation (3 degrees of freedom). It's giving "affine but on a budget" โ the transformation is restricted to rotation around the given axis plus shearing along the two axes perpendicular to the given one. Supported parameters are:
axis =(required, 3dfvector)โ rotation axis.imgboundary = mirror; factoryโ image interpolation boundary conditions. Supported plug-ins over at PLUGINS:1d/splinebc ๐ฆimgkernel = [bspline:d=3]; factoryโ image interpolator kernel. Supported plug-ins over at PLUGINS:1d/splinekernel โจorigin =(required, 3dfvector)โ center of the transformation.
rigid ๐ช
Rigid transformation, i.e. rotation and translation (six degrees of freedom). No stretching, no squishing, just vibes and movement. 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. So yes bestie,<0.5,0.5,0.5>= dead center, main character position ๐
rotation ๐
Rotation transformation (three degrees of freedom). Just spin, no translate. 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. (Same deal asrigid,<0.5,0.5,0.5>= absolute center of the volume โจ)
rotbend ๐
Restricted transformation (4 degrees of freedom). The transformation is restricted to rotation around the x and y axis and a bending along the x axis, independedn in each direction, with the bending increasing with the squared distance from the rotation axis. (yes, that typo is canon, we keep it, character-for-character, no cap ๐). 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 transformation that can be described by a set of B-spline coefficients and an underlying B-spline kernel. This is the "make it whatever you want" one, the unlimited creative mode. Supported parameters are:
anisorate = [[0,0,0]]; 3dfvectorโ anisotropic coefficient rate in pixels, nonpositive values will be overwritten by theratevalue.. (double period, iconic, we stan punctuation)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. For supported plug-ins see PLUGINS:1d/splinekernel ๐penalty = ; factoryโ transformation penalty energy term. For supported plug-ins see PLUGINS:3dtransform/splinepenalty ๐rate = 10; float in [1, inf)โ isotropic coefficient rate in pixels.
translate ๐ผ
Translation (three degrees of freedom). Pure sliding, no rotation, we simply move. 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 ๐
This plug-in implements a transformation that defines a translation for each point of the grid defining the domain of the transformation. So like, a whole custom translation field, point by point, per grid point. 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 ๐พ
Now that we can transform stuff, we gotta be able to save it and load it back, right? These are the IO girlies for 3D transformations. Each one lists the file extensions it recognizes โ and bestie, the extension is literally how the program figures out which plug-in you want, so type them exactly ๐
bbs ๐ฆ
Binary (non-portable) serialized IO of 3D transformations
- Recognized file extensions:
.bbs
โ ๏ธ Heads up: this one is non-portable. It does the job, but don't be surprised if it doesn't travel well between setups, fr fr.
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 ๐งฎ
Ooh, penalty terms. These tell the optimizer "hey, don't do that, it's ugly" โ mathematically. Great for keeping your transformation smooth and well-behaved instead of chaotic and unhinged ๐โจ
divcurl ๐ช๏ธ
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.
gdas</p> โ gradient descent, but make it self-correcting โจ
Bestie, this one is gradient descent with automatic step size correction. Here's the vibe-check on its parameters:
ftolr = 0; double in[0, inf)โ Stop if the relative change of the criterion is below this.max-step = 2; double in(0, inf)โ Maximal absolute step size.maxiter = 200; uint in[1, inf)โ Stopping criterion: the maximum number of iterations.min-step = 0.1; double in(0, inf)โ Minimal absolute step size.xtola = 0.01; double in[0, inf)โ Stop if the inf-norm of the change applied toxis below this value.
gdsq</p> โ gradient descent with quadratic step estimation ๐ฆ
It estimates the step size quadratically. Fancy. Its parameters:
ftolr = 0; double in[0, inf)โ Stop if the relative change of the criterion is below this.gtola = 0; double in[0, inf)โ Stop if the inf-norm of the gradient is below this value.maxiter = 100; uint in[1, inf)โ Stopping criterion: the maximum number of iterations.scale = 2; double in(1, inf)โ Fallback fixed step size scaling.step = 0.1; double in(0, inf)โ Initial step size.xtola = 0; double in[0, inf)โ Stop if the inf-norm of x-update is below this value.
gsl</p> โ the GNU Scientific Library minimizers ๐
This optimizer plugin is built on the multimin optimizers of the GNU Scientific Library (GSL), https://www.gnu.org/software/gsl/. Parameters go like:
eps = 0.01; double in(0, inf)โ gradient based optimizers: stop when|grad| < eps, simplex: stop when simplex size< eps.iter = 100; uint in[1, inf)โ maximum number of iterations.opt = gd; dict โ Specific optimizer to be used. Supported values are:simplexโ Simplex algorithm of Nelder and Meadcg-frโ Flecher-Reeves conjugate gradient algorithmcg-prโ Polak-Ribiere conjugate gradient algorithmbfgsโ Broyden-Fletcher-Goldfarb-Shannbfgs2โ Broyden-Fletcher-Goldfarb-Shann (most efficient version)gdโ Gradient descent.
step = 0.001; double in(0, inf)โ initial step size.tol = 0.1; double in(0, inf)โ some tolerance parameter.
nlopt</p> โ minimizer algorithms via the NLOPT library ๐
Minimizer algorithms using the NLOPT library. For a description of the optimizers, please see 'http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms'. Its parameters:
ftola = 0; double in[0, inf)โ Stopping criterion: the absolute change of the objective value is below this value.ftolr = 0; double in[0, inf)โ Stopping criterion: the relative change of the objective value is below this value.higher = inf; double โ Higher boundary (equal for all parameters).local-opt = none; dict โ local minimization algorithm that may be required for the main minimization algorithm. Supported values are:gn-directโ Dividing Rectanglesgn-direct-lโ Dividing Rectangles (locally biased)gn-direct-l-randโ Dividing Rectangles (locally biased, randomized)gn-direct-noscalโ Dividing Rectangles (unscaled)gn-direct-l-noscalโ Dividing Rectangles (unscaled, locally biased)gn-direct-l-rand-noscaleโ Dividing Rectangles (unscaled, locally biased, randomized)gn-orig-directโ Dividing Rectangles (original implementation)gn-orig-direct-lโ Dividing Rectangles (original implementation, locally biased)ld-lbfgs-nocedalโ Noneld-lbfgsโ Low-storage BFGSln-praxisโ Gradient-free Local Optimization via the Principal-Axis Methodld-var1โ Shifted Limited-Memory Variable-Metric, Rank 1ld-var2โ Shifted Limited-Memory Variable-Metric, Rank 2ld-tnewtonโ Truncated Newtonld-tnewton-restartโ Truncated Newton with steepest-descent restartingld-tnewton-precondโ Preconditioned Truncated Newtonld-tnewton-precond-restartโ Preconditioned Truncated Newton with steepest-descent restartinggn-crs2-lmโ Controlled Random Search with Local Mutationld-mmaโ Method of Moving Asymptotesln-cobylaโ Constrained Optimization BY Linear Approximationln-newuoaโ Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximationln-newuoa-boundโ Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximationln-neldermeadโ Nelder-Mead simplex algorithmln-sbplxโ Subplex variant of Nelder-Meadln-bobyqaโ Derivative-free Bound-constrained Optimizationgn-isresโ Improved Stochastic Ranking Evolution Strategynoneโ don't specify algorithm
lower = -inf; double โ Lower boundary (equal for all parameters).maxiter = 100; int in[1, inf)โ Stopping criterion: the maximum number of iterations.opt = ld-lbfgs; dict โ main minimization algorithm. Supported values are:gn-directโ Dividing Rectanglesgn-direct-lโ Dividing Rectangles (locally biased)gn-direct-l-randโ Dividing Rectangles (locally biased, randomized)gn-direct-noscalโ Dividing Rectangles (unscaled)gn-direct-l-noscalโ Dividing Rectangles (unscaled, locally biased)gn-direct-l-rand-noscaleโ Dividing Rectangles (unscaled, locally biased, randomized)gn-orig-directโ Dividing Rectangles (original implementation)gn-orig-direct-lโ Dividing Rectangles (original implementation, locally biased)ld-lbfgs-nocedalโ Noneld-lbfgsโ Low-storage BFGSln-praxisโ Gradient-free Local Optimization via the Principal-Axis Methodld-var1โ Shifted Limited-Memory Variable-Metric, Rank 1ld-var2โ Shifted Limited-Memory Variable-Metric, Rank 2ld-tnewtonโ Truncated Newtonld-tnewton-restartโ Truncated Newton with steepest-descent restartingld-tnewton-precondโ Preconditioned Truncated Newtonld-tnewton-precond-restartโ Preconditioned Truncated Newton with steepest-descent restartinggn-crs2-lmโ Controlled Random Search with Local Mutationld-mmaโ Method of Moving Asymptotesln-cobylaโ Constrained Optimization BY Linear Approximationln-newuoaโ Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximationln-newuoa-boundโ Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximationln-neldermeadโ Nelder-Mead simplex algorithmln-sbplxโ Subplex variant of Nelder-Meadln-bobyqaโ Derivative-free Bound-constrained Optimizationgn-isresโ Improved Stochastic Ranking Evolution Strategyauglagโ Augmented Lagrangian algorithmauglag-eqโ Augmented Lagrangian algorithm with equality constraints onlyg-mlslโ Multi-Level Single-Linkage (require local optimization and bounds)g-mlsl-ldsโ Multi-Level Single-Linkage (low-discrepancy-sequence, require local gradient based optimization and bounds)ld-slsqpโ Sequential Least-Squares Quadratic Programming
step = 0; double in[0, inf)โ Initial step size for gradient free methods.stop = -inf; double โ Stopping criterion: function value falls below this value.xtola = 0; double in[0, inf)โ Stopping criterion: the absolute change of all x-values is below this value.xtolr = 0; double in[0, inf)โ Stopping criterion: the relative change of all x-values is below this value.
๐ธ EXAMPLE ๐ธ
Okay so picture this: register image test.v to image ref.v affine, and write the registered image out to reg.v. Use two multiresolution levels and ssd as the cost function. Iconic behavior, honestly:
mia-3drigidreg -i test.v -r ref.v -o reg.v -l 2 -f affine -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 โ every last flag, algorithm and boundary preserved, no cap. ๐ซถ This one's from the USER COMMANDS corner of the manual, version v2.4.7, filed under mia-3drigidreg(1). Go register something cute. ๐โจ
๐ฆ where this page comes from
- ubuntu jammy: mia-tools 2.4.7-8ubuntu1 ยท 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