mia-2dmyoica-nonrigid2(1)
πΈ mia-2dmyoica-nonrigid2 β like, the whole vibe πΈ
okay bestie, so this is part of the mia manual β mia-2dmyoica-nonrigid2(1), a General Commands Manual page. It's a whole program and it's lowkey iconic. Sit down, grab a boba, we're doing this. π§β¨
π NAME π
mia-2dmyoica-nonrigid2 β runs a registration of a series of 2D images. That's it, that's the whole job. Periodt.
β¨ SYNOPSIS β¨
mia-2dmyoica-nonrigid2 -i <in-file> -o <out-file> [options]
like, you need your in and your out, and then everything else is just seasoning. π
π¦ DESCRIPTION π¦
So mia-2dmyoica-nonrigid2 runs the non-rigid registration of a perfusion image series. It's giving main character energy in a pipeline.
Every single pass, here's the routine:
- First, an ICA analysis runs β it estimates and eliminates the periodic movement, and creates reference images with intensities similar to the corresponding original image. π
- Then non-rigid registration runs using the
"ssd + divcurl"cost model.
The B-spline c-rate and the divcurl cost weight get changed in each pass according to the parameters you gave. Slay, adaptive.
In the first pass, a bounding box around the LV myocardium may be extracted, which speeds up the computation. Not required, but it's a nice little shortcut. πβοΈ
Special note, and it's an important one: this implementation always runs the registration from the original images, specifically to avoid the accumulation of interpolation errors. No cascading mistakes here, we stay grounded. π
π OPTIONS π
π File-IO
-i,--in-file=(required, input); stringβ your input perfusion data set. Required, bestie, there's no skipping this one.-o,--out-file=(required, output); stringβ the output perfusion data set. Also required. We love a matching pair. π-r,--registered=regβ file name base for registered files. (The original page says "fiels" β we all knew what it meant. π)--save-cropped=β save the cropped set to this file.--save-feature=β save the segmentation feature images and the initial ICA mixing matrix. Two for one, we love to see it. β¨
π§ ICA
--fastica=internalβ which FastICA implementation to use. For the supported plugins, go peek atPLUGINS:fastica/implementation(it's further down this page, keep scrolling π).-C,--components=0β ICA components.0means automatic estimation. Let the algorithm decide, she's capable. π--normalizeβ don't normalize the ICs.--no-meanstripβ don't strip the mean from the mixing curves.-s,--segscale=0β segment and scale the crop box around the LV.0= no segmentation.-k,--skip=0β skip images at the beginning of the series, like, for example because they're of other modalities. Not every frame is invited to the party. π«-m,--max-ica-iter=400β maximum number of iterations in ICA.-E,--segmethod=featuresβ the segmentation method. Your choices are:delta-featureβ difference of the feature imagesdelta-peakβ difference of the peak enhancement imagesfeaturesβ feature images
π₯ Registration
-O,--optimizer=gsl:opt=gd,step=0.1β the optimizer used for minimization. For supported plugins, checkPLUGINS:minimizer/singlecost.-a,--start-c-rate=32β start coefficient rate in spines, which gets divided by--c-rate-dividerwith every pass. (Yes, the original spells it "coefficinet". We're being generous. π)--c-rate-divider=4β coefficient rate divider for each pass.-d,--start-divcurl=20β start divcurl weight, gets divided by--divcurl-dividerwith every pass.--divcurl-divider=4β divcurl weight scaling with each new pass.-w,--imageweight=1β image cost weight.-p,--interpolator=bspline:d=3β image interpolator kernel. For supported plugins seePLUGINS:1d/splinekernel.-l,--mg-levels=3β multi-resolution levels.-P,--passes=3β registration passes.
π«Ά Help & Info
-V,--verbose=warningβ verbosity of output: 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 than or equal to the number of logical processor cores in the machine.-1means automatic estimation. (The original says "Maxiumum" β she's doing her best. π)
π§΅ 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: fastica/implementation π
internalβ this is the MIA implementation of the FastICA algorithm.- (no parameters)
itppβ this is the IT++ implementation of the FastICA algorithm.- (no parameters)
and that's a wrap on part one, bestie β but we are not done, so don't go anywhere π
β¨ PLUGINS: minimizer/singlecost β¨
okay so this is the part where we pick HOW the optimizer does its little thing π
every one of these is a singlecost minimizer plugin, and they all have their own lil parameter menu.
π gdas
gradient descent but make it β¨automaticβ¨ β it corrects the step size on its own, no cap. here's what you can tweak:
ftolr = 0;double in [0, inf)β stop if the relative change of the criterion is below.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 to x is below this value.
π¦ gdsq
gradient descent, but it estimates the step quadratically β she's doing math math π params:
ftolr = 0;double in [0, inf)β stop if the relative change of the criterion is below.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
an optimizer plugin built on the multimin optimizers from the GNU Scientific Library (GSL) β https://www.gnu.org/software/gsl/ β she's iconic and she knows it. params:
eps = 0.01;double in (0, inf)β for gradient based optimizers: stop when |grad| < eps; for simplex: stop when simplex size < eps.iter = 100;uint in [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;double in (0, inf)β initial step size.tol = 0.1;double in (0, inf)β some tolerance parameter.
π₯ nlopt
minimizer algorithms via the NLOPT library π for a full description of the optimizers go look at http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms. params incoming, there's a LOT, stay with me bestie:
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β a 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β 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 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 πΈ
register the perfusion series given in segment.set by using automatic ICA estimation π«Ά skip two images at the beginning and otherwiese (yes, "otherwiese", we keep it) use the default parameters. store the result in registered.set.
mia-2dmyoica-nonrigid2 -i segment.set -o registered.set -k 2
π AUTHOR(s) π
Gert Wollny β the main character who wrote this, periodt π
π 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.
no cap, "ABSOLUTELY NO WARRANTY" is in all caps for a reason, bestie π
and that's the whole page, babes π¦ it's from the USER COMMANDS corner of the world, version v2.4.7, and it's mia-2dmyoica-nonrigid2(1) β slay, go register something β¨π
π¦ where this page comes from
- ubuntu jammy: mia-tools 2.4.7-8ubuntu1 Β· GPL-3.0-or-later
- ubuntu noble: mia-tools 2.4.7-13build4 Β· 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