mia-2dmyoi...d-parallel(1)
β¨ NAME β¨
mia-2dmyoica-nonrigid-parallel β bestie, this one runs a registration of a series of 2D images. That's it, that's the whole job. π«Ά
π SYNOPSIS π
mia-2dmyoica-nonrigid-parallel -i <in-file> -o <out-file> [options]
π DESCRIPTION π
So mia-2dmyoica-nonrigid-parallel implements the 2D version of 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.
And the iconic twist? This version of the program runs all registrations in parallel. No waiting around, we multitask in this house. π
π OPTIONS π
π File-IO
-i,--in-file=(input, required); stringβ the input perfusion data set. Required, bestie, you literally cannot skip it. π-o,--out-file=(output, required); stringβ the output perfusion data set. Also required. Both of these are non-negotiable.-r,--registered=regβ file name base for the registered images. The image type and the numbering scheme get taken straight from the input images, exactly as they're given in the input data set. π--save-cropped=(output); stringβ save the cropped set to this file; the image files will use the stem of the name as the file name base.--save-feature=(output); stringβ save segmentation feature images and the initial ICA mixing matrix.--save-refs=(output); stringβ for every registration pass, save the reference images to files with the given name base.--save-regs=(output); stringβ for every registration pass, save the intermediate registered images. Snapshot era, we love to see it. πΈ
π Help & Info
-V,--verbose=warningβ verbosity of output; 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β prints the copyright information.-h,--helpβ prints this help.-?,--usageβ prints a short help.--versionβ prints the version number and exits. Bye. π
π§ͺ ICA
--fastica=internalβ which FastICA implementation to use. For the supported plugins, go look atPLUGINS:fastica/implementation.-C,--components=0β ICA components.0means automatic estimation. Let the algorithm pick, she knows what she's doing. β¨--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 they're of other modalities. Not all of them are the vibe, and that's valid. π-m,--max-ica-iter=400β maximum number of iterations in ICA.-E,--segmethod=featuresβ the segmentation method. Pick your fighter:delta-featureβ difference of the feature imagesdelta-peakβ difference of the peak enhancement imagesfeaturesβ feature images
-b,--min-breathing-frequency=-1β the minimal mean frequency a mixing curve can have to be considered as stemming from breathing. For reference, a healthy rest breathing rate is 12 per minute. A negative value disables the test entirely.
βοΈ 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. (-1= automatic estimation.) Let her cook. π₯
π₯ Registration
-O,--optimizer=gsl:opt=gd,step=0.1β the optimizer used for minimization. The string value gets used to construct a plug-in. For the supported plugins, seePLUGINS:minimizer/singlecost.-a,--start-c-rate=16β start coefficient rate in spines; it gets divided by--c-rate-dividerwith every pass.--c-rate-divider=2β coefficient rate divider for each pass.-d,--start-divcurl=10000β start divcurl weight; it 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. Do not specify thesrcandrefparameters β the program sets those itself. The string value gets used to construct a plug-in. For the supported plugins, seePLUGINS:2dimage/fullcost.-l,--mg-levels=3β multi-resolution levels.-P,--passes=3β registration passes.
π§ PLUGINS: 1d/splinekernel
bspline
B-spline kernel creation. The supported parameters are:
d = 3; int in [0, 5]β spline degree.
omoms
OMoms-spline kernel creation. The supported parameters are:
d = 3; int in [3, 3]β spline degree.
π PLUGINS: 2dimage/cost
lncc
Local normalized cross correlation with masking support. The 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. The 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 the moving image parzen histogram. 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 the reference image parzen histogram. 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. The supported parameters are:
eval = ds; dictβ plugin subtype. The supported values are:sqβ square of differencedsβ square of scaled differencedotβ scalar product kernelcrossβ cross product kernel
ssd
2D image cost: sum of squared differences. The supported parameters are:
autothresh = 0; float in [0, 1000]β use automatic masking of the moving image by only taking intensity values into account 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. The supported parameters are:
rthresh = 0; doubleβ threshold intensity value for the reference image.sthresh = 0; doubleβ threshold intensity value for the source image.
β¨ PLUGINS: 2dimage/fullcost β¨
π image
A generalized image similarity cost function that also handles multi-resolution processing, okay? The actual similarity measure gets passed in as an extra parameter. Here's everything it'll take:
cost = ssd; factoryβ the cost function kernel. Wanna see the supported plug-ins? Peep PLUGINS:2dimage/costdebug = 0; boolβ saves intermediate results so you can debug. Little detective mode π΅οΈref =(input, io)β the reference image. For the supported file types go look at PLUGINS:2dimage/iosrc =(input, io)β the study image. Supported file types live in PLUGINS:2dimage/ioweight = 1; floatβ the weight of the cost function.
π labelimage
A similarity cost function that maps the labels of two images and handles label-preserving multi-resolution processing. Slay. Here's what you can pass:
debug = 0; int in [0, 1]β writes the distance transforms out to a 3D image.maxlabel = 256; int in [2, 32000]β the maximum number of labels to consider.ref =(input, io)β the reference image. Supported file types: PLUGINS:2dimage/iosrc =(input, io)β the study image. Supported file types: PLUGINS:2dimage/ioweight = 1; floatβ the weight of the cost function.
π¦ maskedimage
A generalized masked image similarity cost function that also handles multi-resolution processing. The actual similarity measure comes in as an extra parameter. Here's the tea though:
The masks you provide should be densely filled regions in multi-resolution processing β otherwise the mask information can literally get lost when the image gets downscaled. π
Also: the reference mask and the transformed mask of the study image get combined by binary AND. Now the params:
cost = ssd; factoryβ the cost function kernel. For supported plug-ins see PLUGINS:2dimage/maskedcostref =(input, io)β the reference image. Supported file types: PLUGINS:2dimage/ioref-mask =(input, io)β the reference image mask (binary). Supported file types: PLUGINS:2dimage/iosrc =(input, io)β the study image. Supported file types: PLUGINS:2dimage/iosrc-mask =(input, io)β the study image mask (binary). Supported file types: PLUGINS:2dimage/ioweight = 1; floatβ the weight of the cost function.
π PLUGINS: 2dimage/io π
All the file-format besties, one by one. Let's go π
π bmp
BMP 2D-image input/output support. This plug-in reads and writes binary images and 8-bit gray scale images, and it gives you read-only support for 4-bit gray scale images. The color table gets ignored entirely β the pixel values are just taken as literal gray scale values.
- Recognized file extensions:
.BMP,.bmp - Supported element types: binary data, unsigned 8 bit
π§ datapool
Virtual IO to and from the internal data pool.
- Recognized file extensions:
.@
π dicom
2D image io for DICOM.
- Recognized file extensions:
.DCM,.dcm - Supported element types: signed 16 bit, unsigned 16 bit
β¨ exr
A 2dimage io plugin for OpenEXR images.
- Recognized file extensions:
.EXR,.exr - Supported element types: unsigned 32 bit, floating point 32 bit
πΈ jpg
A 2dimage io plugin for jpeg gray scale images.
- Recognized file extensions:
.JPEG,.JPG,.jpeg,.jpg - Supported element types: unsigned 8 bit
π«Ά png
A 2dimage io plugin for png images.
- Recognized file extensions:
.PNG,.png - Supported element types: binary data, unsigned 8 bit, unsigned 16 bit
π₯ raw
RAW 2D-image output support.
- Recognized file extensions:
.RAW,.raw - 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
π tif
TIFF 2D-image input/output support.
- Recognized file extensions:
.TIF,.TIFF,.tif,.tiff - Supported element types: binary data, unsigned 8 bit, unsigned 16 bit, unsigned 32 bit
π vista
A 2dimage io plugin for vista images.
- 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
π PLUGINS: 2dimage/maskedcost π
The masked-cost girlies. Every single one of these plays nice with masks.
π lncc
Local normalized cross correlation with masking support. Params:
w = 5; uint in [1, 256]β the half width of the window used for evaluating the localized cross correlation.
π« mi
Spline parzen based mutual information with masking. Params:
cut = 0; float in [0, 40]β the percentage of pixels to cut at high and low intensities, to remove outliers.mbins = 64; uint in [1, 256]β the number of histogram bins used for the moving image.mkernel = [bspline:d=3]; factoryβ the spline kernel for the moving image parzen histogram. For supported plug-ins see PLUGINS:1d/splinekernelrbins = 64; uint in [1, 256]β the number of histogram bins used for the reference image.rkernel = [bspline:d=0]; factoryβ the spline kernel for the reference image parzen histogram. For supported plug-ins see PLUGINS:1d/splinekernel
π ncc
Normalized cross correlation with masking support.
- (no parameters) β she's low maintenance, periodt. π
π¦ ssd
Sum of squared differences with masking.
- (no parameters) β also zero-config, iconic behavior.
π PLUGINS: fastica/implementation π
Two ways to run FastICA, pick your fighter:
β internal
This is the MIA implementation of the FastICA algorithm.
- (no parameters)
π itpp
This is the IT++ implementation of the FastICA algorithm.
- (no parameters)
okay so this is the minimizer squad β the plugins that actually hunt down the minimum for you. four of them. all valid, all with their own little parameter families. let's go π
π PLUGINS: minimizer/singlecost π
gdas β gradient descent, but she corrects her own step size π«Ά
The whole vibe: gradient descent with automatic step size correction. Her parameters:
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 with quadratic step estimation β¨
Same energy, but she estimates the step with a quadratic instead of just vibing. Parameters:
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 β the GNU Scientific Library girlie πΈ
This one is an optimizer plugin built on the multimin optimizers of the GNU Scientific Library (GSL) β https://www.gnu.org/software/gsl/. Parameters:
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 β the whole entire NLOPT catalogue, no cap π₯
Minimizer algorithms using the NLOPT library. For a description of the optimizers please see http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms. Her 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 π
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-parallel -i segment.set -o registered.set -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.
and that's a wrap bestie π«Ά this whole thing is USER COMMANDS, version v2.4.7, and you just finished reading mia-2dmyoi...d-parallel(1). go register something iconic. periodt πβ¨π
π¦ where this page comes from
- debian bookworm: mia-tools 2.4.7-11+b1 Β· 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