mia-3dnonrigidreg(1)

๐Ÿ“ฆ
version 2.4.7 ยท 4 versions
, in ubuntu resolute, ubuntu stonking

okay bestie, this is the manual page for mia-3dnonrigidreg(1) โ€” general commands manual section, iykyk ๐Ÿ’–. It's giving "non-linear registration of 3D images" and we're gonna go through every single detail, no cap. Let's go โœจ.

โœจ NAME โœจ

mia-3dnonrigidreg โ€” Non-linear registration of 3D images. That's it, that's the whole point: it registers two 3D images non-linearly. Periodt.

๐ŸŒธ SYNOPSIS ๐ŸŒธ

mia-3dnonrigidreg -i <in-image> -r <ref-image> -o <out-image> [options]
<PLUGINS:3dimage/fullcost>

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So mia-3dnonrigidreg? This program implements the registration of two gray scale 3D images. That's the vibe. It's literally matching up two 3D grayscale images in a non-linear way. Slay.

๐Ÿ’… OPTIONS ๐Ÿ’…

๐ŸŽ€ 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 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 โ€” print copyright information
  • -h, --help โ€” print this help
  • -?, --usage โ€” print a short help
  • --version โ€” print the version number and exit

๐Ÿซถ IO ๐Ÿซถ

  • -i, --in-image=(input, required); io โ€” test image. For supported file types see PLUGINS:3dimage/io
  • -r, --ref-image=(input, required); io โ€” reference image. For supported file types see PLUGINS:3dimage/io
  • -o, --out-image=(output, required); io โ€” registered output image. For supported file types see PLUGINS:3dimage/io
  • -t, --transformation=(output); io โ€” output transformation. For supported file types see PLUGINS:3dtransform/io

๐Ÿ˜ญ 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 ๐Ÿ‘‘

  • -l, --levels=3 โ€” multi-resolution levels
  • -O, --optimizer=gsl:opt=gd,step=0.1 โ€” Optimizer used for minimization. For supported plugins see PLUGINS:minimizer/singlecost
  • -f, --transForm=spline:rate=10 โ€” transformation type. For supported plugins see PLUGINS:3dimage/transform

๐ŸŒˆ PLUGINS: 1d/spacialkernel ๐ŸŒˆ

cdiff

Central difference filter kernel, mirror boundary conditions are used.

(no parameters)

gauss

spacial Gauss filter kernel, supported parameters are:

  • w = 1; uint in [0, inf) โ€” half filter width.

scharr

This plugin provides the 1D folding kernel for the Scharr gradient filter

(no parameters)

๐Ÿ’œ PLUGINS: 1d/splinebc ๐Ÿ’œ

mirror

Spline interpolation boundary conditions that mirror on the boundary

(no parameters)

repeat

Spline interpolation boundary conditions that repeats the value at the boundary

(no parameters)

zero

Spline interpolation boundary conditions that assumes zero for values outside

(no parameters)

โœจ 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: 3dimage/combiner ๐Ÿ“

absdiff

Image combiner 'absdiff'

(no parameters)

add

Image combiner 'add'

(no parameters)

div

Image combiner 'div'

(no parameters)

mul

Image combiner 'mul'

(no parameters)

sub

Image combiner 'sub'

(no parameters)

๐Ÿงš PLUGINS: 3dimage/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.

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 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 reference image parzen hinstogram. 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. Given normalized gradient fields $ _S$ of the src image and $ _R$ of the ref image various evaluators are implemented., supported parameters are:

  • eval = ds; dict โ€” plugin subtype (sq, ds,dot,cross). Supported values are:
    • ds โ€” square of scaled difference
    • dot โ€” scalar product kernel
    • cross โ€” cross product kernel

ssd

3D image 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

3D 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: 3dimage/filter ๐ŸŒธ

bandpass

intensity bandpass filter, supported parameters are:

  • max = 3.40282e+38; float โ€” maximum of the band.
  • min = 0; float โ€” minimum of the band.

binarize

image binarize filter, supported parameters are:

  • max = 3.40282e+38; float โ€” maximum of accepted range.
  • min = 0; float โ€” minimum of accepted range.

close

morphological close, supported parameters are:

  • hint = black; string โ€” a hint at the main image content (black|white).
  • shape = [sphere:r=2]; factory โ€” structuring element. For supported plug-ins see PLUGINS:3dimage/shape

combiner

Combine two images with the given combiner operator. if 'reverse' is set to false, the first operator is the image passed through the filter pipeline, and the second image is loaded from the file given with the 'image' parameter the moment the filter is run., supported parameters are:

  • image =(input, required, io) โ€” second image that is needed in the combiner. For supported file types see PLUGINS:3dimage/io
  • op =(required, factory) โ€” Image combiner to be applied to the images. For supported plug-ins see PLUGINS:3dimage/combiner
  • reverse = 0; bool โ€” reverse the order in which the images passed to the combiner.

convert

image pixel format conversion filter, supported parameters are:

  • a = 1; float โ€” linear conversion parameter a.
  • b = 0; float โ€” linear conversion parameter b.
  • map = opt; dict โ€” conversion mapping. Supported values are:
    • copy โ€” copy data when converting
    • linear โ€” apply linear transformation x -> a*x+b
    • range โ€” apply linear transformation that maps the input data type range to the output data type range
    • opt โ€” apply a linear transformation that maps the real input range to the full output range
    • optstat โ€” apply a linear transform that maps based on input mean and variation to the full output range
  • repn = ubyte; dict โ€” output pixel type. Supported values are:
    • bit โ€” binary data
    • sbyte โ€” signed 8 bit
    • ubyte โ€” unsigned 8 bit
    • sshort โ€” signed 16 bit
    • ushort โ€” unsigned 16 bit
    • sint โ€” signed 32 bit
    • uint โ€” unsigned 32 bit
    • slong โ€” signed 64 bit
    • ulong โ€” unsigned 64 bit
    • float โ€” floating point 32 bit
    • double โ€” floating point 64 bit
    • none โ€” no pixel type defined

crop

Crop a region of an image, the region is always clamped to the original image size in the sense that the given range is kept., supported parameters are:

  • end = [[4294967295,4294967295,4294967295]]; streamable โ€” end of cropping range, maximum = (-1,-1,-1).
  • start = [[0,0,0]]; streamable โ€” begin of cropping range.

dilate

3d image stack dilate filter, supported parameters are:

  • hint = black; string โ€” a hint at the main image content (black|white).
  • shape = [sphere:r=2]; factory โ€” structuring element. For supported plug-ins see PLUGINS:3dimage/shape

distance

Evaluate the 3D distance transform of an image. If the image is a binary mask, then result of the distance transform in each point corresponds to the Euclidian distance to the mask. If the input image is of a scalar pixel value, then the this scalar is interpreted as heighfield and the per pixel value adds to the distance.

  • (no parameters) โ€” nope, nothing, zero params, it just does its lil thing and that's that โœจ

downscale ๐Ÿ’–

Lowkey the glow-down of image filters: it shrinks your input image by picking a block size and using that as the downscale factor. But bestie, before it scales anything it runs a smoothing filter first, so the high-frequency data gets yeeted and you don't get aliasing artifacts. Skincare routine for pixels, fr.

  • b = [[1,1,1]] 3dbounds โ€” the blocksize.
  • bx = 1 uint in [1, inf) โ€” blocksize in the x direction.
  • by = 1 uint in [1, inf) โ€” blocksize in the y direction.
  • bz = 1 uint in [1, inf) โ€” blocksize in the z direction.
  • kernel = gauss factory โ€” the smoothing filter kernel that gets applied, and the filter size is estimated based on the blocksize. For supported plug-ins see PLUGINS:1d/spacialkernel.

erode ๐Ÿซถ

A 3d image stack erode filter. Shrinky vibes but make it morphology.

  • hint = black string โ€” a hint at the main image content (black|white).
  • shape = [sphere:r=2] factory โ€” the structuring element. For supported plug-ins see PLUGINS:3dimage/shape.

gauss ๐ŸŽ€

Isotropic 3D gauss filter, the classic. Blurred but make it three-dimensional.

  • w = 1 int in [0, inf) โ€” filter width parameter.

gradnorm ๐ŸŒˆ

3D image to gradient norm filter. That's the whole job description, periodt.

  • (no parameters) โ€” nothing to configure, it's giving effortless.

growmask ๐Ÿฆ‹

Okay so this one takes an input binary mask plus a reference gray scale image, and does region growing: it keeps adding neighborhood pixels of a pixel that's already in, but only if those neighbors have a lower intensity that's still above the given threshold. Very "invite the whole group chat" energy.

  • min = 1 float โ€” lower threshold for mask growing.
  • ref (input, required, io) โ€” reference image for mask region growing. For supported file types see PLUGINS:3dimage/io.
  • shape = 6n factory โ€” the neighborhood mask. For supported plug-ins see PLUGINS:3dimage/shape.

invert ๐Ÿ™ˆ

Intensity invert filter. Black becomes white, white becomes black, everything flips, iconic.

  • (no parameters) โ€” literally none, bestie.

isovoxel ๐Ÿ’œ

This filter scales an image so the voxel size goes isometric, and it scales the size to match the given value. Two glow-ups in one, no cap.

  • interp = [bspline:d=3] factory โ€” the interpolation kernel to be used. For supported plug-ins see PLUGINS:1d/splinekernel.
  • size = 1 float in (0, inf) โ€” the isometric target voxel size.

kmeans ๐Ÿ”ฅ

3D image k-means filter. In the output image each pixel value is the class membership, and the class centers get stored as an attribute on the image. Cluster girl summer.

  • c = 3 int in [2, inf) โ€” number of classes.

label โญ

A filter to label the connected components of a binary image. Every connected blob gets its own little name tag.

  • n = 6n factory โ€” the neighborhood mask. For supported plug-ins see PLUGINS:3dimage/shape.

labelmap ๐Ÿ“

Image filter to remap label id's. Only applicable to images with integer valued intensities/labels โ€” so if your labels aren't integers, this is not your filter, sorry bestie.

  • map (input, required, string) โ€” Label mapping file.

labelscale ๐Ÿงš

A filter that only creates output voxels that are already created in the input image. Scaling happens via a voting algorithm that picks the target pixel value based on the highest pixel count of a certain label in the corresponding source region. And plot twist: if that region has two labels with the same count, the one with the lower number wins. Tiebreaker rules, we love to see it.

  • out-size (required, 3dbounds) โ€” target size given as two coma separated values.

load ๐ŸŒธ

Loads the input image from a file and uses it to replace the current image in the pipeline. Swapping the main character mid-scene.

  • file (input, required, io) โ€” name of the input file to load from. For supported file types see PLUGINS:3dimage/io.

lvdownscale ๐Ÿ‘‘

This is a label voting downscale filter. It downscales a 3D image by blocks: for each block, the (non-zero) label that shows up the most times in that block becomes the output pixel in the target image. And if two labels appear the same number of times? The one with the lower absolute value wins. Democracy but with a tiebreaker, periodt.

  • b = [[1,1,1]] 3dbounds โ€” blocksize for the downscaling. Each block will be represented by one pixel in the target image.

mask ๐Ÿ’…

Masks an image โ€” one image comes from the parameter list and the other comes from the normal filter input. Both images have to be the same dimensions, and one of them must be binary. The attributes of the image coming through the filter pipeline are preserved. The output pixel type matches whichever input image is not binary. No cap, that's the whole rule.

  • input (input, required, io) โ€” second input image file name. For supported file types see PLUGINS:3dimage/io.

mean ๐Ÿ’–

3D image mean filter. Averaging out the drama.

  • w = 1 int in [1, inf) โ€” half filter width.

median ๐Ÿซถ

Median 3d filter. The chill one that ignores the outliers.

  • w = 1 int in [1, inf) โ€” filter width parameter.

mlv ๐ŸŒˆ

Mean of Least Variance 3D image filter. Yes, MLV, it's giving acronym main character.

  • w = 1 int in [1, inf) โ€” filter width parameter.

msnormalizer ๐Ÿฆ‹

3D image mean-sigma normalizing filter. Normalize the vibes, sigma style.

  • w = 1 int in [1, inf) โ€” half filter width.

open ๐ŸŽ€

Morphological open. The erode-then-dilate moment, we stan.

  • hint = black string โ€” a hint at the main image content (black|white).
  • shape = [sphere:r=2] factory โ€” the structuring element. For supported plug-ins see PLUGINS:3dimage/shape.

reorient ๐Ÿ’œ

3D image reorientation filter. Because sometimes your brain just needs a different angle.

  • map = xyz dict โ€” orientation mapping to be applied. Supported values are:
    • xyz โ€” keep orientation
    • p-yzx โ€” permutate x->z->y->x
    • p-zxy โ€” permutate x->y->z->x
    • f-yz โ€” flip y-z
    • f-xy โ€” flip x-y
    • f-xz โ€” flip x-z
    • r-x90 โ€” rotate around x-axis clockwise 90 degree
    • r-x180 โ€” rotate around x-axis clockwise 180 degree
    • r-x270 โ€” rotate around x-axis clockwise 270 degree
    • r-y90 โ€” rotate around y-axis clockwise 90 degree
    • r-y180 โ€” rotate around y-axis clockwise 180 degree
    • r-y270 โ€” rotate around y-axis clockwise 270 degree
    • r-z90 โ€” rotate around z-axis clockwise 90 degree
    • r-z180 โ€” rotate around z-axis clockwise 180 degree
    • r-z270 โ€” rotate around z-axis clockwise 270 degree

resize ๐Ÿ”ฅ

Resizes an image. The original data gets centered within the newly sized image, so it's not shoved into a corner, thank god.

  • size = [[0,0,0]] streamable โ€” new size of the image; a size of 0 means keep the size for the corresponding dimension.

sandp โญ

Salt and pepper 3d filter. Seasoning your image, literally.

  • thresh = 100 float in [0, inf) โ€” thresh value.
  • w = 1 int in [1, inf) โ€” filter width parameter.

scale ๐Ÿ“

3D image filter that scales to a given target size. Resize but make it floaty.

  • interp = [bspline:d=3] factory โ€” the interpolation kernel to be used. For supported plug-ins see PLUGINS:1d/splinekernel.
  • s = [[0,0,0]] 3dbounds โ€” target size to set all components at once (component 0: use input image size).
  • sx = 0 uint in [0, inf) โ€” target size in x direction (0: use input image size).
  • sy = 0 uint in [0, inf) โ€” target size in y direction (0: use input image size).
  • sz = 0 uint in [0, inf) โ€” target size in y direction (0: use input image size).

scharr ๐Ÿงš

The 3D Scharr filter for gradient evaluation. Heads up bestie: the output pixel type of the filtered image is the same as the input pixel type, so converting your input to a floating point valued image beforehand is recommendable. Don't skip that step, I'm begging.

  • dir = x dict โ€” Gradient direction. Supported values are:
    • x โ€” gradient in x-direction
    • y โ€” gradient in y-direction
    • z โ€” gradient in z-direction

selectbig ๐ŸŒธ

A filter that creates a binary mask representing the intensity with the highest pixel count. The pixel value 0 gets ignored, and if two intensities have the same pixel count, then the result is undefined. Also the input pixel must have an integral pixel type. Ties are chaos, proceed accordingly.

  • (no parameters) โ€” none, she decides everything herself.

sepconv ๐Ÿ‘‘

3D image intensity separable convolution filter. Three kernels, one for each axis, living their separate lives.

  • kx = [gauss:w=1] factory โ€” filter kernel in x-direction. For supported plug-ins see PLUGINS:1d/spacialkernel.
  • ky = [gauss:w=1] factory โ€” filter kernel in y-direction. For supported plug-ins see PLUGINS:1d/spacialkernel.
  • kz = [gauss:w=1] factory โ€” filter kernel in z-direction. For supported plug-ins see PLUGINS:1d/spacialkernel.

sobel ๐Ÿ’…

The 2D Sobel filter for gradient evaluation. Same warning as Scharr, bestie: the output pixel type of the filtered image is the same as the input pixel type, so converting your input beforehand to a floating point valued image is recommendable.

  • dir = x dict โ€” Gradient direction. Supported values are:
    • x โ€” gradient in x-direction
    • y โ€” gradient in y-direction
    • z โ€” gradient in z-direction
  • sws โ€” seeded watershead. This algorithm extracts exactly as many reagions as initial labels are given in the seed image. Supported params:
    • grad = 0; bool โ€” interpret the input image as gradient. (The original has a lil double period . ., we respect it ๐Ÿ’…)
    • mark = 0; bool โ€” mark the segmented watersheds with a special gray scale value.
    • n = [sphere:r=1]; factory โ€” neighborhood for watershead region growing. For supported plug-ins see PLUGINS:3dimage/shape.
    • seed =(input, required, string) โ€” seed input image containing the labels for the initial regions.
  • tee โ€” save the input image to a file and also pass it through to the next filter. Supported params:
    • file =(output, required, io) โ€” name of the output file to save the image too. (Yes, too, not to โ€” we don't edit.) For supported file types see PLUGINS:3dimage/io.
  • thinning โ€” 3D morphological thinning, based on: Lee and Kashyap, 'Building Skeleton Models via 3-D Medial Surface/Axis Thinning Algorithms', Graphical Models and Image Processing, 56(6):462-478, 1994. This implementation only supports the 26 neighbourhood.
    • (no parameters) โ€” literally none. It's giving minimalist. โœจ
  • transform โ€” transform the input image with the given transformation. Supported params:
    • file =(input, required, io) โ€” name of the file containing the transformation. For supported file types see PLUGINS:3dtransform/io.
    • imgboundary = ; factory โ€” override image interpolation boundary conditions. For supported plug-ins see PLUGINS:1d/splinebc.
    • imgkernel = ; factory โ€” override image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • variance โ€” 3D image variance filter. Supported params:
    • w = 1; int in [1, inf) โ€” half filter width.
  • ws โ€” basic watershead segmentation. Supported params:
    • evalgrad = 0; bool โ€” set to 1 if the input image does not represent a gradient norm image.
    • mark = 0; bool โ€” mark the segmented watersheds with a special gray scale value.
    • n = [sphere:r=1]; factory โ€” neighborhood for watershead region growing. For supported plug-ins see PLUGINS:3dimage/shape.
    • thresh = 0; float in [0, 1) โ€” relative gradient norm threshold. The actual value threshold value is thresh * (max_grad - min_grad) + min_grad. Bassins separated by gradients with a lower norm will be joined.

โœจ PLUGINS: 3dimage/fullcost โœจ

  • image โ€” generalized image similarity cost function that also handles multi-resolution processing. The actual similarity measure is given es extra parameter. Supported params:
    • cost = ssd; factory โ€” cost function kernel. For supported plug-ins see PLUGINS:3dimage/cost.
    • debug = 0; bool โ€” save intermediate resuts for debugging.
    • ref =(input, io) โ€” reference image. For supported file types see PLUGINS:3dimage/io.
    • src =(input, io) โ€” study image. For supported file types see PLUGINS:3dimage/io.
    • weight = 1; float โ€” weight of cost function.
  • labelimage โ€” similarity cost function that maps labels of two images and handles label-preserving multi-resolution processing. Supported params:
    • maxlabel = 256; int in [2, 32000] โ€” maximum number of labels to consider.
    • ref =(input, io) โ€” reference image. For supported file types see PLUGINS:3dimage/io.
    • src =(input, io) โ€” study image. For supported file types see PLUGINS:3dimage/io.
    • weight = 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 mask may be pre-filtered - after pre-filtering the masks must be of bit-type. 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 params:
    • cost = ssd; factory โ€” cost function kernel. For supported plug-ins see PLUGINS:3dimage/maskedcost.
    • ref =(input, io) โ€” reference image. For supported file types see PLUGINS:3dimage/io.
    • ref-mask =(input, io) โ€” reference image mask (binary). For supported file types see PLUGINS:3dimage/io.
    • ref-mask-filter = ; factory โ€” filter to prepare the reference mask image, the output must be a binary image. For supported plug-ins see PLUGINS:3dimage/filter.
    • src =(input, io) โ€” study image. For supported file types see PLUGINS:3dimage/io.
    • src-mask =(input, io) โ€” study image mask (binary). For supported file types see PLUGINS:3dimage/io.
    • src-mask-filter = ; factory โ€” filter to prepare the study mask image, the output must be a binary image. For supported plug-ins see PLUGINS:3dimage/filter.
    • weight = 1; float โ€” weight of cost function.
  • taggedssd โ€” evaluates the Sum of Squared Differences similarity measure by using three tagged image pairs. The cost function value is evaluated based on all image pairs, but the gradient is composed by composing its component based on the tag direction. Supported params:
    • refx =(input, io) โ€” reference image X-tag. For supported file types see PLUGINS:3dimage/io.
    • refy =(input, io) โ€” reference image Y-tag. For supported file types see PLUGINS:3dimage/io.
    • refz =(input, io) โ€” reference image Z-tag. For supported file types see PLUGINS:3dimage/io.
    • srcx =(input, io) โ€” study image X-tag. For supported file types see PLUGINS:3dimage/io.
    • srcy =(input, io) โ€” study image Y-tag. For supported file types see PLUGINS:3dimage/io.
    • srcz =(input, io) โ€” study image Z-tag. For supported file types see PLUGINS:3dimage/io.
    • weight = 1; float โ€” weight of cost function.

๐Ÿ’พ PLUGINS: 3dimage/io ๐Ÿ’พ

okay bestie, this is the whole reading and writing department โ€” every file format this bad boy can slurp up or spit out. one bullet per format, extensions listed exactly, element types listed exactly, no edits, no shortcuts. let's go ๐Ÿซถ


๐ŸŒธ analyze โ€” Analyze 7.5 image

the classic old-school medical imaging vibe. Analyze 7.5, iconic, vintage, still holding up ๐Ÿ’…

Recognized file extensions: .HDR, .hdr

Supported element types:

  • unsigned 8 bit
  • signed 16 bit
  • signed 32 bit
  • floating point 32 bit
  • floating point 64 bit

๐ŸŽ€ datapool โ€” Virtual IO to and from the internal data pool

not a real file on your disk, bestie โ€” it's a pretend-IO door straight into the internal data pool. iykyk โœจ

Recognized file extensions: .@


๐Ÿฉป dicom โ€” Dicom image series as 3D

a whole stack of Dicom slices gets stacked up into one 3D image. it's giving "pile of papers but make it volumetric" ๐Ÿ“š

Recognized file extensions: .DCM, .dcm

Supported element types:

  • signed 16 bit
  • unsigned 16 bit

๐Ÿ’œ hdf5 โ€” HDF5 3D image IO

Recognized file extensions: .H5, .h5

Supported element types:

  • binary data
  • signed 8 bit
  • unsigned 8 bit
  • signed 16 bit
  • unsigned 16 bit
  • signed 32 bit
  • unsigned 32 bit
  • signed 64 bit
  • unsigned 64 bit
  • floating point 32 bit
  • floating point 64 bit

๐ŸŒˆ inria โ€” INRIA image

Recognized file extensions: .INR, .inr

Supported element types:

  • 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

๐Ÿงš mhd โ€” MetaIO 3D image IO using the VTK implementation (experimental).

heads up bestie, this one is experimental โ€” the VTK implementation is doing the heavy lifting here, so be a lil gentle with it ๐Ÿ™ˆ

Recognized file extensions: .MHA, .MHD, .mha, .mhd

Supported element types:

  • 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

๐Ÿง  nifti โ€” NIFTI-1 3D image IO. The orientation is transformed in the same way like it is done with dicomtonifti --no-reorder from the vtk-dicom package.

like, the orientation handling is literally the exact same as dicomtonifti --no-reorder from the vtk-dicom package. same energy, same transform, no cap ๐ŸŒŸ

Recognized file extensions: .NII, .nii

Supported element types:

  • signed 8 bit
  • unsigned 8 bit
  • signed 16 bit
  • unsigned 16 bit
  • signed 32 bit
  • unsigned 32 bit
  • signed 64 bit
  • unsigned 64 bit
  • floating point 32 bit
  • floating point 64 bit

๐Ÿ“ vff โ€” VFF Sun raster format

Recognized file extensions: .VFF, .vff

Supported element types:

  • unsigned 8 bit
  • signed 16 bit

๐Ÿ‘‘ vista โ€” Vista 3D

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
yes bestie, .- is a real extension, that's not a typo, that's just Vista being Vista ๐Ÿ’€

โญ vti โ€” 3D image VTK-XML in- and output (experimental).

another experimental one, so vibe check it before you trust it with your precious data, fr fr

Recognized file extensions: .VTI, .vti

Supported element types:

  • 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

๐Ÿฆ‹ vtk โ€” 3D VTK image legacy in- and output (experimental).

legacy + experimental, the double whammy. it works, but it's the old ways, okay ๐Ÿ˜ญ

Recognized file extensions: .VTK, .VTKIMAGE, .vtk, .vtkimage

Supported element types:

  • 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: 3dimage/maskedcost ๐ŸŽฏ

so this whole family is the cost functions with masking support โ€” they all do the same job as their unmasked cousins but you get to tell them which pixels actually count ๐Ÿ’… masking era, obsessed.


๐ŸŒธ 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.

๐Ÿ’– 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.
  • 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 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 reference image parzen hinstogram. For supported plug-ins see PLUGINS:1d/splinekernel

โœจ ncc โ€” normalized cross correlation with masking support.

(no parameters)

like, zero knobs to turn. she just works ๐Ÿซถ


๐Ÿ”ฅ ssd โ€” Sum of squared differences with masking.

(no parameters)

again, no parameters. pure vibes, no configuration. slay.


๐Ÿ”ฎ PLUGINS: 3dimage/shape ๐Ÿ”ฎ

neighborhood shape generators, bestie โ€” they define which surrounding voxels count as "neighbors" for a given voxel. pick your shape, pick your crowd ๐ŸŒˆ


๐ŸงŠ 18n โ€” 18n neighborhood 3D shape creator

(no parameters)


๐Ÿ’Ž 26n โ€” 26n neighborhood 3D shape creator

(no parameters)


โฌ› 6n โ€” 6n neighborhood 3D shape creator

(no parameters)


๐ŸŽ€ sphere โ€” Closed spherical shape neighborhood including the pixels within a given radius r.

supported parameters are:

  • r = 2; float in (0, inf) โ€” sphere radius.
note the interval, bestie: it's (0, inf) โ€” open on the left, so zero is not a vibe here, radius has to be strictly greater than 0 ๐Ÿ™ˆ

๐Ÿฆ‹ PLUGINS: 3dimage/transform ๐Ÿฆ‹

okay bestie, this is the glow-up section: all the transforms that actually move your image around. pick your fave ๐Ÿ’…

affine

The full 12-degrees-of-freedom affine transformation โ€” she does it all. Supported parameters are:

  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, peek at PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. Supported plug-ins live in PLUGINS:1d/splinekernel.

axisrot

A restricted rotation transformation, just 1 degree of freedom. She's only allowed to spin around the axis you hand her, about the rotation center you give her. Supported parameters are:

  • axis = (required, 3dfvector) โ€” the rotation axis.
  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • origin = (required, 3dfvector) โ€” center of the transformation.

raffine

The restricted affine transformation, 3 degrees of freedom on the clock. She can only rotate around the axis you picked and shear along the two axes perpendicular to it. Supported parameters are:

  • axis = (required, 3dfvector) โ€” rotation axis.
  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • origin = (required, 3dfvector) โ€” center of the transformation.

rigid

The rigid transformation โ€” rotation and translation, six degrees of freedom. She's stiff in the best way, like a good hairspray. Supported parameters are:

  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • origin = [[0,0,0]]; 3dfvector โ€” relative rotation center. iykyk: <0.5,0.5,0.5> is literally the center of the volume. ๐ŸŽฏ

rotation

The rotation transformation, three degrees of freedom, just spinning fr. Supported parameters are:

  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • origin = [[0,0,0]]; 3dfvector โ€” relative rotation center, so <0.5,0.5,0.5> corresponds to the center of the volume.

rotbend

A restricted transformation with 4 degrees of freedom. She's locked to rotating around the x and y axis plus a bending along the x axis, independent in each direction (yes, the original really does say independedn, bless), and the bending grows with the squared distance from the rotation axis. Supported parameters are:

  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • norot = 0; bool โ€” don't optimize the rotation. Leave it alone, she said.
  • origin = (required, 3dfvector) โ€” center of the transformation.

spline

The free-form transformation โ€” the main character. You describe her with a whole set of B-spline coefficients plus an underlying B-spline kernel. Supported parameters are:

  • anisorate = [[0,0,0]]; 3dfvector โ€” anisotropic coefficient rate in pixels. Nonpositive values get overwritten by the rate value, periodt.
  • debug = 0; bool โ€” enable additional debugging output. ๐Ÿ‘€
  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.
  • kernel = [bspline:d=3]; factory โ€” transformation spline kernel. Supported plug-ins are in PLUGINS:1d/splinekernel.
  • penalty = ; factory โ€” transformation penalty energy term. Supported plug-ins live in PLUGINS:3dtransform/splinepenalty.
  • rate = 10; float in [1, inf) โ€” isotropic coefficient rate in pixels.

translate

The translation transformation, three degrees of freedom โ€” she just slides, no spinning, no drama. Supported parameters are:

  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.

vf

This plug-in implements a transformation that defines a translation for every single point of the grid that defines the domain of the transformation. so much freedom, so much responsibility ๐Ÿ˜ญ Supported parameters are:

  • imgboundary = mirror; factory โ€” image interpolation boundary conditions. For the supported plug-ins, see PLUGINS:1d/splinebc.
  • imgkernel = [bspline:d=3]; factory โ€” image interpolator kernel. For supported plug-ins see PLUGINS:1d/splinekernel.

๐Ÿ’พ PLUGINS: 3dtransform/io ๐Ÿ’พ

the โœจread/writeโœจ girlies for your transformations. every one of them tells you which file extensions it recognizes. ๐Ÿซถ

bbs

Binary (non-portable, bestie, so don't go mailing these around) serialized IO of 3D transformations.

Recognized file extensions: .bbs

datapool

Virtual IO to and from the internal data pool.

Recognized file extensions: .@

vista

Vista storage of 3D transformations.

Recognized file extensions: .v, .v3dt

xml

XML serialized IO of 3D transformations.

Recognized file extensions: .x3dt


๐ŸŒธ PLUGINS: 3dtransform/splinepenalty ๐ŸŒธ

divcurl

The divcurl penalty on the transformation. Supported parameters are:

  • curl = 1; float in [0, inf) โ€” penalty weight on curl.
  • div = 1; float in [0, inf) โ€” penalty weight on divergence.
  • norm = 0; bool โ€” set to 1 if the penalty should be normalized with respect to the image size.
  • weight = 1; float in (0, inf) โ€” weight of penalty energy.

no cap, that's only part 5 โ€” there's more where that came from, so don't go anywhere ๐Ÿ’–

๐Ÿ’– PLUGINS: minimizer/singlecost

Okay bestie, this is the โœจoptimizerโœจ shelf โ€” the lil engines that actually do the minimizing. There's no one-size-fits-all, so here's the whole lineup, every knob included, no cap.


๐ŸŒˆ gdas

Gradient descent with automatic step size correction. Iconic, dependable, does the thing. Supported parameters are:

  • ftolr = 0; double in [0, inf) โ€” stop if the relative change of the criterion drops below this. ๐Ÿ›‘
  • max-step = 2; double in (0, inf) โ€” the maximal absolute step size. Don't let it yeet too far.
  • maxiter = 200; uint in [1, inf) โ€” stopping criterion: the maximum number of iterations. It's giving "we stop eventually".
  • min-step = 0.1; double in (0, inf) โ€” the 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. Fancier, tbh. Supported parameters are:

  • ftolr = 0; double in [0, inf) โ€” stop if the relative change of the criterion is below this. ๐Ÿ›‘
  • 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. Gotta start somewhere ๐Ÿ’…
  • xtola = 0; double in [0, inf) โ€” stop if the inf-norm of the x-update is below this value.

๐Ÿ‘‘ gsl

Optimizer plugin based on the multimin optimizers of the GNU Scientific Library (GSL) https://www.gnu.org/software/gsl/ โ€” yes the real one, we're fancy. Supported parameters are:

  • 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 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

Minimizer algorithms using the NLOPT library โ€” for a description of the optimizers please see http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms. Supported parameters are:

  • 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 โ€” 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
    • 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 image test.v to image ref.v by using a spline transformation with a coefficient rate of 5 and write the registered image to reg.v. Use two multiresolution levels, ssd as image cost function and divcurl weighted by 10.0 as transformation smoothness penalty. Slay, here's the vibe:

mia-3dnonrigidreg -i test.v -r ref.v -o reg.v -l 2 -f spline:rate=3
       image:cost=ssd divcurl:weight=10

๐Ÿซถ AUTHOR(s)

Gert Wollny ๐Ÿ’œ

okay bestie, legal tea time, don't scroll past this one ๐Ÿซถ

This software is Copyright (c) 1999โ€2015 Leipzig, Germany and Madrid, Spain. yes literally two cities, iconic collaborative energy, we love a multinational slay ๐ŸŒโœจ

It comes with ABSOLUTELY NO WARRANTY. like, none. zero. not a crumb. if it breaks, that's between you and the universe, no cap ๐Ÿ’€

You may redistribute it under the terms of the GNU GENERAL PUBLIC LICENSE Version 3 (or later). so like, share it, pass it around, just keep it free the way it was born, fr fr ๐Ÿงš

Want the full legal lore? Just run the program with the option --copyright and it'll spill everything. periodt ๐Ÿ“œ


and that's the whole page, bestie!! ๐ŸŽ€ you made it to the very end, main character behavior honestly ๐Ÿ‘‘

This came out of the USER COMMANDS manual, version v2.4.7, filed under mia-3dnonrigidreg(1). go forth and register things non-rigidly, i'm obsessed ๐Ÿ’…โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from