mia-2dmyoica-nonrigid(1)
okay so bestie, this is the mia-2dmyoica-nonrigid(1) page from the General Commands Manual, and it is literally about running a registration of a series of 2D images. buckle up, we're going full main-character energy through every flag, every plugin, every tiny default. no skips. periodt. ๐
โจ
โจ NAME โจ
mia-2dmyoica-nonrigid โ Run a registration of a series of 2D images.
๐ฆ SYNOPSIS ๐ฆ
mia-2dmyoica-nonrigid -i <in-file> -o <out-file> [options]
๐ธ DESCRIPTION ๐ธ
mia-2dmyoica-nonrigid This program implements the motion compensation algorithm described in
Wollny G, Kellman P, Santos A, Ledesma-Carbayo M-J, "Automatic Motion Compensation of Free Breathing acquired Myocardial Perfusion Data by using Independent Component Analysis" Medical Image Analysis, 2012.
so yeah, it's giving motion compensation, and the citation is right there. iconic. ๐
๐ OPTIONS ๐
๐ File-IO ๐
-i,--in-file=(input, required); stringโ input perfusion data set-o,--out-file=(output, required); stringโ output perfusion data set-r,--registered=regโ file name base for registered fiels--save-cropped=โ save cropped set to this file--save-feature=โ save the features images resulting from the ICA and some intermediate images used for the RV-LV segmentation with the given file name base to PNG files. Also save the coefficients of the initial best and the final IC mixing matrix.--save-refs=โ save synthetic reference images--save-regs=โ save intermediate registered images
๐ซถ 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
๐ง ICA ๐ง
--fastica=internalโ FastICA implementationto be used- For supported plugins see
PLUGINS:fastica/implementation
- For supported plugins see
-C,--components=0โ ICA components 0 = automatic estimation--normalizeโ normalized 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 e.g. because as they are of other modalities-m,--max-ica-iter=400โ maximum number of iterations in ICA-E,--segmethod=featuresโ Segmentation methoddelta-featureโ difference of the feature imagesdelta-peakโ difference of the peak enhancement imagesfeaturesโ feature images
-b,--min-breathing-frequency=-1โ minimal mean frequency a mixing curve can have to be considered to stem from brething. A healthy rest breating rate is 12 per minute. A negative value disables the test.
๐ 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).
๐ Registration ๐
-O,--optimizer=gsl:opt=gd,step=0.1โ Optimizer used for minimization- For supported plugins see
PLUGINS:minimizer/singlecost
- For supported plugins see
-R,--refiner=โ optimizer used for refinement after the main optimizer was called- For supported plugins see
PLUGINS:minimizer/singlecost
- For supported plugins see
-a,--start-c-rate=16โ start coefficinet rate in spines, gets divided by--c-rate-dividerwith every pass--c-rate-divider=2โ cofficient rate divider for each pass-d,--start-divcurl=10โ start divcurl weight, gets divided by--divcurl-dividerwith every pass--divcurl-divider=2โ divcurl weight scaling with each new pass-w,--imagecost=image:weight=1,cost=ssdโ image cost- For supported plugins see
PLUGINS:2dimage/fullcost
- For supported plugins see
-l,--mg-levels=3โ multi-resolution levels-P,--passes=5โ registration passes
โญ 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: 2dimage/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.
lsdโ Least-Squares Distance measure- (no parameters)
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. Various evaluation kernels are available., supported parameters are:eval = ds; dictโ plugin subtype. Supported values are:sqโ square of differencedsโ square of scaled differencedotโ scalar product kernelcrossโ cross product kernel
ssdโ 2D imaga 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โ 2D 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: 2dimage/fullcost ๐
imageโ Generalized image similarity cost function that also handles multi-resolution processing. The actual similarity measure is given es extra parameter., supported parameters are:cost = ssd; factoryโ Cost function kernel. For supported plug-ins seePLUGINS:2dimage/costdebug = 0; boolโ Save intermediate resuts for debugging.ref =(input, io)โ Reference image. For supported file types seePLUGINS:2dimage/iosrc =(input, io)โ Study image. For supported file types seePLUGINS:2dimage/ioweight = 1; floatโ weight of cost function.
labelimageโ Similarity cost function that maps labels of two images and handles label-preserving multi-resolution processing., supported parameters are:debug = 0; int in [0, 1]โ write the distance transforms to a 3D image.maxlabel = 256; int in [2, 32000]โ maximum number of labels to consider.ref =(input, io)โ Reference image. For supported file types seePLUGINS:2dimage/iosrc =(input, io)โ Study image. For supported file types seePLUGINS:2dimage/ioweight = 1; floatโ weight of cost function.
maskedimageโ Generalized masked image similarity cost function that also handles multi-resolution processing. The provided masks should be densly filled regions in multi-resolution procesing because otherwise the mask information may get lost when downscaling the image. The reference mask and the transformed mask of the study image are combined by binary AND. The actual similarity measure is given es extra parameter., supported parameters are:cost = ssd; factoryโ Cost function kernel. For supported plug-ins seePLUGINS:2dimage/maskedcostref =(input, io)โ Reference image. For supported file types seePLUGINS:2dimage/ioref-mask =(input, io)โ Reference image mask (binary). For supported file types seePLUGINS:2dimage/iosrc =(input, io)โ Study image. For supported file types seePLUGINS:2dimage/iosrc-mask =(input, io)โ Study image mask (binary). For supported file types seePLUGINS:2dimage/ioweight = 1; floatโ weight of cost function.
๐ PLUGINS: 2dimage/io ๐
okay so these are all the little io besties โ the ones that actually read and write your images. each one has its own vibe, its own file extensions, and its own list of element types it'll fw. let's go ๐
๐ผ๏ธ bmp
BMP 2D-image input/output support. she reads and writes binary images and 8-bit gray scale images, and she'll do read-only for 4-bit gray scale images. the color table? ignored, bestie. pixel values get taken as literal gray scale values, periodt.
- Recognized file extensions:
.BMP,.bmp - Supported element types:
binary dataunsigned 8 bit
๐ datapool
Virtual IO to and from the internal data pool. that's it, that's the whole vibe.
- Recognized file extensions:
.@
๐ฉป dicom
2D image io for DICOM. medical girlies rise ๐ซถ
- Recognized file extensions:
.DCM,.dcm - Supported element types:
signed 16 bitunsigned 16 bit
โจ exr
a 2dimage io plugin for OpenEXR images. fancy rendering energy, no cap.
- Recognized file extensions:
.EXR,.exr - Supported element types:
unsigned 32 bitfloating point 32 bit
๐ธ jpg
a 2dimage io plugin for jpeg gray scale images. gray scale ONLY, she said what she said.
- Recognized file extensions:
.JPEG,.JPG,.jpeg,.jpg - Supported element types:
unsigned 8 bit
๐ฆ png
a 2dimage io plugin for png images. the internet's favorite, honestly iconic.
- Recognized file extensions:
.PNG,.png - Supported element types:
binary dataunsigned 8 bitunsigned 16 bit
๐งฑ raw
RAW 2D-image output support. note the word output, bestie โ read the room, it's giving write-only.
- Recognized file extensions:
.RAW,.raw - Supported element types:
binary datasigned 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating point 64 bit
like, every single element type? she ate that fr fr ๐ฅ
๐๏ธ tif
TIFF 2D-image input/output support. the workhorse. the main character.
- Recognized file extensions:
.TIF,.TIFF,.tif,.tiff - Supported element types:
binary dataunsigned 8 bitunsigned 16 bitunsigned 32 bit
๐ vista
a 2dimage io plugin for vista images. yes, her file extension is literally .v and also .V. yes that's chaotic. no we're not discussing it ๐
- Recognized file extensions:
.-,.V,.VISTA,.v,.vista - Supported element types:
binary datasigned 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating point 64 bit
๐ PLUGINS: 2dimage/maskedcost ๐
these are the cost functions that know how to handle a mask โ like, they respect the covered/uncovered pixels, which is very demure, very mindful of them. here's the lineup:
๐ 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. so the actual window is like, twice this plus one. don't @ me, that's just how it is.
๐ฎ mi
Spline parzen based mutual information with masking. supported parameters are:
cut = 0; float in [0, 40]โ percentage of pixels to cut at high and low intensities, to remove outliers. bye bye weirdo pixels โ๏ธmbins = 64; uint in [1, 256]โ number of histogram bins used for the moving image.mkernel = [bspline:d=3]; factoryโ spline kernel for the moving image parzen histogram. 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 the reference image parzen histogram. for supported plug-ins see PLUGINS:1d/splinekernel.
ngl the defaultmkernelis[bspline:d=3]and the defaultrkernelis[bspline:d=0]. they are NOT the same. don't mix them up, bestie, i'm begging ๐
๐ ncc
normalized cross correlation with masking support.
- (no parameters)
she's low maintenance. no knobs, no dials, just vibes โจ
๐ ssd
Sum of squared differences with masking.
- (no parameters)
also zero parameters. also zero drama. ๐ซถ
๐ง PLUGINS: fastica/implementation ๐ง
these are the implementations of the FastICA algorithm โ like, two different engines, same iconic algorithm. pick your fighter:
๐ internal
This is the MIA implementation of the FastICA algorithm.
- (no parameters)
homegrown, handcrafted, locally sourced ๐
๐ฆ itpp
This is the IT++ implementation of the FastICA algorithm.
- (no parameters)
the other one. equally parameterless. equally valid. we love options.
๐ง PLUGINS: minimizer/singlecost ๐ง
Bestie, this is where the magic actually happens โ the thing that nudges your parameters around until the cost stops screaming. Four minimizers live here, each with its own lil personality and its own dials. Let's get into it ๐
๐ gdas โ gradient descent w/ automatic step size correction
Old reliable. It goes downhill and fixes its own step size as it goes.
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 toxis below this value.
๐ gdsq โ gradient descent w/ quadratic step estimation
Same vibe as gdas but it estimates the step quadratically instead of just correcting it. Fancier, lowkey.
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 ofx-update is below this value.
๐ง gsl โ GNU Scientific Library multimin optimizers
This one's a glow-up: it's a plugin built on top of the multimin optimizers from the GNU Scientific Library (GSL), over at https://www.gnu.org/software/gsl/. Iconic library, no cap.
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 โ minimizers via the NLOPT library
The whole squad of algorithms, fr fr. For a full description of every optimizer go read http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms โ it's giving encyclopedia, but it's the real tea.
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.
๐ซถ friendly reminder thatlocal-optonly matters for the algorithms that need a local optimizer โ theg-mlslandg-mlsl-ldsentries literally say so in their own descriptions, iykyk.
โจ EXAMPLE โจ
Okay so here's the moment. Register the perfusion series given in segment.set by using automatic ICA estimation. Skip two images at the beginning and otherwiese use the default parameters. Store the result in registered.set.
mia-2dmyoica-nonrigid -i segment.set -o registered.set -k 2
๐ note that the manpage really does spell it "otherwiese". I am simply the messenger, bestie, and I refuse to be the one who breaks a legend.
๐ 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 a wrap, bestie!! ๐ธ You just read the whole mia-2dmyoica-nonrigid(1) page, part 3 of 3, and honestly? Slay. It comes from the USER COMMANDS manual section, version v2.4.7, and the page is filed under mia-2dmyoica-nonrigid(1) โ no date on the footer, so don't come for me about it ๐. Go register some hearts, king ๐๐
๐ฆ 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