mia-2dgroundtruthreg(1)
โจ NAME โจ
ok so bestie, mia-2dgroundtruthreg โ that's the manual name, and it lives in the General Commands Manual section โ it's literally Registration of a series of 2D images ๐
๐ SYNOPSIS ๐
mia-2dgroundtruthreg -i <in-file> -o <out-file> -A <alpha> -B <beta> -R
<rho_thresh> [options]
๐ DESCRIPTION ๐
mia-2dgroundtruthreg is the program that implements non-linear registration based on Pseudo Ground Thruth for motion compensation of series of myocardial perfusion images ๐ซโจ โ exactly as described in:
Chao Li and Ying Sun, 'Nonrigid Registration of Myocardial Perfusion MRI Using Pseudo Ground Truth', In Proc. Medical Image Computing and Computer-Assisted Intervention MICCAI 2009, 165-172, 2009.
ngl this next part matters: for this nonlinear motion correction a preceding linear registration step is usually required. like, do the linear one first, okay? don't skip it ๐ญ
๐ธ OPTIONS ๐ธ
๐ File-IO ๐
-i,--in-file=(input, required); stringโ the input perfusion data set. required, no cap ๐-o,--out-file=(required, output); stringโ the output perfusion data set. also required, also non-negotiable ๐-r,--registered=regโ file name base for registered files
๐ฆ Preconditions ๐ฆ
-s,--skip=2โ skip images at beginning of series (default is2, she's a lil impatient, we respect it)-P,--passes=4โ number of registration passes (default4, iconic)
๐ Pseudo-Ground-Thruth ๐
-A,--alpha=(required); doubleโ spacial neighborhood penalty weight-B,--beta=(required); doubleโ temporal second derivative penalty weight-R,--rho_thresh=(required); doubleโ correlation threshold for neighborhood analysis
heads up: all three of these are required. the program will simply not be doing the vibe check without them fr fr ๐
๐ฅ Registration ๐ฅ
-O,--optimizer=gsl:opt=gd,step=0.1โ Optimizer used for minimization. For supported plugins seePLUGINS:minimizer/singlecost-p,--interpolator=bspline:d=3โ image interpolator kernel. For supported plugins seePLUGINS:1d/splinekernel-l,--mr-levels=3โ multi-resolution levels-d,--divcurl=20โ divcurl regularization weight--divcurl-divider=4โ divcurl weight scaling with each new pass-a,--start-c-rate=32โ start coefficinet rate in spines, gets divided by--c-rate-dividerwith every pass--c-rate-divider=4โ cofficient rate divider for each pass-w,--imageweight=1โ image cost weight
๐ง 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).
so basically if you don't know what to put, leave it at -1 and let her figure it out, she's got main character energy ๐
๐ 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.
โจ okay bestie that's the first chunk, more is coming, stay tuned โจ
๐งฎ minimizer/singlecost ๐งฎ
Okay bestie, this is the section where you pick how the minimizer does its little optimization dance. Every one of these is a plugin, and every one has its own parameters, so buckle up ๐
โจ gdas โจ
Gradient descent with automatic step size correction. She's simple, she's classic, she works. Here's what she takes:
ftolr = 0โdoublein[0, inf). Stop if the relative change of the criterion is below.max-step = 2โdoublein(0, inf). Maximal absolute step size.maxiter = 200โuintin[1, inf). Stopping criterion: the maximum number of iterations.min-step = 0.1โdoublein(0, inf). Minimal absolute step size.xtola = 0.01โdoublein[0, inf). Stop if the inf-norm of the change applied toxis below this value.
๐ธ gdsq ๐ธ
Gradient descent but make it โจquadraticโจ โ this one estimates the step with a quadratic fit instead of just vibing. Parameters:
ftolr = 0โdoublein[0, inf). Stop if the relative change of the criterion is below.gtola = 0โdoublein[0, inf). Stop if the inf-norm of the gradient is below this value.maxiter = 100โuintin[1, inf). Stopping criterion: the maximum number of iterations.scale = 2โdoublein(1, inf). Fallback fixed step size scaling.step = 0.1โdoublein(0, inf). Initial step size.xtola = 0โdoublein[0, inf). Stop if the inf-norm ofx-update is below this value.
๐ gsl ๐
This one's an optimizer plugin built on the multimin optimizers of the GNU Scientific Library (GSL) โ go peep https://www.gnu.org/software/gsl/. Parameters, bestie:
eps = 0.01โdoublein(0, inf). For gradient based optimizers: stop when|grad| < eps; for simplex: stop when simplex size< eps.iter = 100โuintin[1, inf). Maximum number of iterations.opt = gdโdict. The 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โdoublein(0, inf). Initial step size.tol = 0.1โdoublein(0, inf). Some tolerance parameter.
๐ฆ nlopt ๐ฆ
Minimizer algorithms using the NLOPT library. For a description of the optimizers please see http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms. Ngl this list is long, but we do not skip a single one ๐
ftola = 0โdoublein[0, inf). Stopping criterion: the absolute change of the objective value is below this value.ftolr = 0โdoublein[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โintin[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โdoublein[0, inf). Initial step size for gradient free methods.stop = -infโdouble. Stopping criterion: function value falls below this value.xtola = 0โdoublein[0, inf). Stopping criterion: the absolute change of allx-values is below this value.xtolr = 0โdoublein[0, inf). Stopping criterion: the relative change of allx-values is below this value.
๐ EXAMPLE ๐
Okay so here's the moment you've been waiting for โ register the perfusion series given by images imageXXXX.exr by using Pseudo Ground Truth estimation. Skip two images at the beginning and otherwise use the default parameters. Store the result images to regXXXX.exr. Slay.
mia-2dgroundtruthreg -i imageXXXX.exr -o regXXXX.exr -k 2
๐ 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.
Fr fr, read that warranty line again. There is none. None whatsoever. ๐ญ
And that's the whole page, bestie โ this was mia-2dgroundtruthreg(1), straight out of the USER COMMANDS section, version v2.4.7, dated as per the original page footer. Go forth and register those perfusion series, you absolute icon ๐โจ๐ฆ
๐ฆ 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