mia-2dmyoi...d-parallel(1)

πŸ“¦
version 2.4.7 Β· 3 versions
, in debian bookworm, ubuntu resolute, ubuntu stonking

✨ 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 trace
    • debug β€” debug output
    • info β€” low level messages
    • message β€” normal messages
    • warning β€” warnings
    • fail β€” report test failures
    • error β€” report errors
    • fatal β€” 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 at PLUGINS:fastica/implementation.
  • -C, --components=0 β€” ICA components. 0 means 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 images
    • delta-peak β€” difference of the peak enhancement images
    • features β€” 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, see PLUGINS:minimizer/singlecost.
  • -a, --start-c-rate=16 β€” start coefficient rate in spines; it gets divided by --c-rate-divider with every pass.
  • --c-rate-divider=2 β€” coefficient rate divider for each pass.
  • -d, --start-divcurl=10000 β€” start divcurl weight; it gets divided by --divcurl-divider with every pass.
  • --divcurl-divider=2 β€” divcurl weight scaling with each new pass.
  • -w, --imagecost=image:weight=1,cost=ssd β€” image cost. Do not specify the src and ref parameters β€” the program sets those itself. The string value gets used to construct a plug-in. For the supported plugins, see PLUGINS: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 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.

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 difference
    • ds β€” square of scaled difference
    • dot β€” scalar product kernel
    • cross β€” 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/cost
  • debug = 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/io
  • src =(input, io) β€” the study image. Supported file types live in PLUGINS:2dimage/io
  • weight = 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/io
  • src =(input, io) β€” the study image. Supported file types: PLUGINS:2dimage/io
  • weight = 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/maskedcost
  • ref =(input, io) β€” the reference image. Supported file types: PLUGINS:2dimage/io
  • ref-mask =(input, io) β€” the reference image mask (binary). Supported file types: PLUGINS:2dimage/io
  • src =(input, io) β€” the study image. Supported file types: PLUGINS:2dimage/io
  • src-mask =(input, io) β€” the study image mask (binary). Supported file types: PLUGINS:2dimage/io
  • weight = 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/splinekernel
  • rbins = 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 to x is 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 of x-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 Mead
    • cg-fr β€” Flecher-Reeves conjugate gradient algorithm
    • cg-pr β€” Polak-Ribiere conjugate gradient algorithm
    • bfgs β€” Broyden-Fletcher-Goldfarb-Shann
    • bfgs2 β€” 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 Rectangles
    • gn-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 β€” None
    • ld-lbfgs β€” Low-storage BFGS
    • ln-praxis β€” Gradient-free Local Optimization via the Principal-Axis Method
    • ld-var1 β€” Shifted Limited-Memory Variable-Metric, Rank 1
    • ld-var2 β€” Shifted Limited-Memory Variable-Metric, Rank 2
    • ld-tnewton β€” Truncated Newton
    • ld-tnewton-restart β€” Truncated Newton with steepest-descent restarting
    • ld-tnewton-precond β€” Preconditioned Truncated Newton
    • ld-tnewton-precond-restart β€” Preconditioned Truncated Newton with steepest-descent restarting
    • gn-crs2-lm β€” Controlled Random Search with Local Mutation
    • ld-mma β€” Method of Moving Asymptotes
    • ln-cobyla β€” Constrained Optimization BY Linear Approximation
    • ln-newuoa β€” Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximation
    • ln-newuoa-bound β€” Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximation
    • ln-neldermead β€” Nelder-Mead simplex algorithm
    • ln-sbplx β€” Subplex variant of Nelder-Mead
    • ln-bobyqa β€” Derivative-free Bound-constrained Optimization
    • gn-isres β€” Improved Stochastic Ranking Evolution Strategy
    • none β€” 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 Rectangles
    • gn-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 β€” None
    • ld-lbfgs β€” Low-storage BFGS
    • ln-praxis β€” Gradient-free Local Optimization via the Principal-Axis Method
    • ld-var1 β€” Shifted Limited-Memory Variable-Metric, Rank 1
    • ld-var2 β€” Shifted Limited-Memory Variable-Metric, Rank 2
    • ld-tnewton β€” Truncated Newton
    • ld-tnewton-restart β€” Truncated Newton with steepest-descent restarting
    • ld-tnewton-precond β€” Preconditioned Truncated Newton
    • ld-tnewton-precond-restart β€” Preconditioned Truncated Newton with steepest-descent restarting
    • gn-crs2-lm β€” Controlled Random Search with Local Mutation
    • ld-mma β€” Method of Moving Asymptotes
    • ln-cobyla β€” Constrained Optimization BY Linear Approximation
    • ln-newuoa β€” Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximation
    • ln-newuoa-bound β€” Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximation
    • ln-neldermead β€” Nelder-Mead simplex algorithm
    • ln-sbplx β€” Subplex variant of Nelder-Mead
    • ln-bobyqa β€” Derivative-free Bound-constrained Optimization
    • gn-isres β€” Improved Stochastic Ranking Evolution Strategy
    • auglag β€” Augmented Lagrangian algorithm
    • auglag-eq β€” Augmented Lagrangian algorithm with equality constraints only
    • g-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


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