mia-3dnonrigidreg(1)
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 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
๐ซถ IO ๐ซถ
-i,--in-image=(input, required); ioโ test image. For supported file types seePLUGINS:3dimage/io-r,--ref-image=(input, required); ioโ reference image. For supported file types seePLUGINS:3dimage/io-o,--out-image=(output, required); ioโ registered output image. For supported file types seePLUGINS:3dimage/io-t,--transformation=(output); ioโ output transformation. For supported file types seePLUGINS: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 seePLUGINS:minimizer/singlecost-f,--transForm=spline:rate=10โ transformation type. For supported plugins seePLUGINS: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 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. 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 differencedotโ scalar product kernelcrossโ 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 seePLUGINS: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 seePLUGINS:3dimage/ioop =(required, factory)โ Image combiner to be applied to the images. For supported plug-ins seePLUGINS:3dimage/combinerreverse = 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 convertinglinearโ apply linear transformation x -> a*x+brangeโ apply linear transformation that maps the input data type range to the output data type rangeoptโ apply a linear transformation that maps the real input range to the full output rangeoptstatโ 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 datasbyteโ signed 8 bitubyteโ unsigned 8 bitsshortโ signed 16 bitushortโ unsigned 16 bitsintโ signed 32 bituintโ unsigned 32 bitslongโ signed 64 bitulongโ unsigned 64 bitfloatโ floating point 32 bitdoubleโ floating point 64 bitnoneโ 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 seePLUGINS: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 = 1uint in [1, inf) โ blocksize in the x direction.by = 1uint in [1, inf) โ blocksize in the y direction.bz = 1uint in [1, inf) โ blocksize in the z direction.kernel = gaussfactory โ the smoothing filter kernel that gets applied, and the filter size is estimated based on the blocksize. For supported plug-ins seePLUGINS:1d/spacialkernel.
erode ๐ซถ
A 3d image stack erode filter. Shrinky vibes but make it morphology.
hint = blackstring โ a hint at the main image content (black|white).shape = [sphere:r=2]factory โ the structuring element. For supported plug-ins seePLUGINS:3dimage/shape.
gauss ๐
Isotropic 3D gauss filter, the classic. Blurred but make it three-dimensional.
w = 1int 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 = 1float โ lower threshold for mask growing.ref(input, required, io)โ reference image for mask region growing. For supported file types seePLUGINS:3dimage/io.shape = 6nfactory โ the neighborhood mask. For supported plug-ins seePLUGINS: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 seePLUGINS:1d/splinekernel.size = 1float 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 = 3int 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 = 6nfactory โ the neighborhood mask. For supported plug-ins seePLUGINS: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 seePLUGINS: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 seePLUGINS:3dimage/io.
mean ๐
3D image mean filter. Averaging out the drama.
w = 1int in [1, inf) โ half filter width.
median ๐ซถ
Median 3d filter. The chill one that ignores the outliers.
w = 1int in [1, inf) โ filter width parameter.
mlv ๐
Mean of Least Variance 3D image filter. Yes, MLV, it's giving acronym main character.
w = 1int in [1, inf) โ filter width parameter.
msnormalizer ๐ฆ
3D image mean-sigma normalizing filter. Normalize the vibes, sigma style.
w = 1int in [1, inf) โ half filter width.
open ๐
Morphological open. The erode-then-dilate moment, we stan.
hint = blackstring โ a hint at the main image content (black|white).shape = [sphere:r=2]factory โ the structuring element. For supported plug-ins seePLUGINS:3dimage/shape.
reorient ๐
3D image reorientation filter. Because sometimes your brain just needs a different angle.
map = xyzdict โ orientation mapping to be applied. Supported values are:xyzโ keep orientationp-yzxโ permutate x->z->y->xp-zxyโ permutate x->y->z->xf-yzโ flip y-zf-xyโ flip x-yf-xzโ flip x-zr-x90โ rotate around x-axis clockwise 90 degreer-x180โ rotate around x-axis clockwise 180 degreer-x270โ rotate around x-axis clockwise 270 degreer-y90โ rotate around y-axis clockwise 90 degreer-y180โ rotate around y-axis clockwise 180 degreer-y270โ rotate around y-axis clockwise 270 degreer-z90โ rotate around z-axis clockwise 90 degreer-z180โ rotate around z-axis clockwise 180 degreer-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 = 100float in [0, inf) โ thresh value.w = 1int 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 seePLUGINS:1d/splinekernel.s = [[0,0,0]]3dbounds โ target size to set all components at once (component 0: use input image size).sx = 0uint in [0, inf) โ target size in x direction (0: use input image size).sy = 0uint in [0, inf) โ target size in y direction (0: use input image size).sz = 0uint 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 = xdict โ Gradient direction. Supported values are:xโ gradient in x-directionyโ gradient in y-directionzโ 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 seePLUGINS:1d/spacialkernel.ky = [gauss:w=1]factory โ filter kernel in y-direction. For supported plug-ins seePLUGINS:1d/spacialkernel.kz = [gauss:w=1]factory โ filter kernel in z-direction. For supported plug-ins seePLUGINS: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 = xdict โ Gradient direction. Supported values are:xโ gradient in x-directionyโ gradient in y-directionzโ 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 seePLUGINS: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, nottoโ we don't edit.) For supported file types seePLUGINS: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 seePLUGINS:3dtransform/io.imgboundary = ; factoryโ override image interpolation boundary conditions. For supported plug-ins seePLUGINS:1d/splinebc.imgkernel = ; factoryโ override image interpolator kernel. For supported plug-ins seePLUGINS: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 seePLUGINS:3dimage/shape.thresh = 0; float in [0, 1)โ relative gradient norm threshold. The actual value threshold value isthresh * (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 seePLUGINS:3dimage/cost.debug = 0; boolโ save intermediate resuts for debugging.ref =(input, io)โ reference image. For supported file types seePLUGINS:3dimage/io.src =(input, io)โ study image. For supported file types seePLUGINS: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 seePLUGINS:3dimage/io.src =(input, io)โ study image. For supported file types seePLUGINS: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 seePLUGINS:3dimage/maskedcost.ref =(input, io)โ reference image. For supported file types seePLUGINS:3dimage/io.ref-mask =(input, io)โ reference image mask (binary). For supported file types seePLUGINS:3dimage/io.ref-mask-filter = ; factoryโ filter to prepare the reference mask image, the output must be a binary image. For supported plug-ins seePLUGINS:3dimage/filter.src =(input, io)โ study image. For supported file types seePLUGINS:3dimage/io.src-mask =(input, io)โ study image mask (binary). For supported file types seePLUGINS:3dimage/io.src-mask-filter = ; factoryโ filter to prepare the study mask image, the output must be a binary image. For supported plug-ins seePLUGINS: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 seePLUGINS:3dimage/io.refy =(input, io)โ reference image Y-tag. For supported file types seePLUGINS:3dimage/io.refz =(input, io)โ reference image Z-tag. For supported file types seePLUGINS:3dimage/io.srcx =(input, io)โ study image X-tag. For supported file types seePLUGINS:3dimage/io.srcy =(input, io)โ study image Y-tag. For supported file types seePLUGINS:3dimage/io.srcz =(input, io)โ study image Z-tag. For supported file types seePLUGINS: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 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 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 atPLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. Supported plug-ins live inPLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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 theratevalue, periodt.debug=0;boolโ enable additional debugging output. ๐imgboundary=mirror; factory โ image interpolation boundary conditions. For the supported plug-ins, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS:1d/splinekernel.kernel=[bspline:d=3]; factory โ transformation spline kernel. Supported plug-ins are inPLUGINS:1d/splinekernel.penalty= ; factory โ transformation penalty energy term. Supported plug-ins live inPLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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, seePLUGINS:1d/splinebc.imgkernel=[bspline:d=3]; factory โ image interpolator kernel. For supported plug-ins seePLUGINS: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 to1if 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;doublein[0, inf)โ stop if the relative change of the criterion drops below this. ๐max-step=2;doublein(0, inf)โ the maximal absolute step size. Don't let it yeet too far.maxiter=200;uintin[1, inf)โ stopping criterion: the maximum number of iterations. It's giving "we stop eventually".min-step=0.1;doublein(0, inf)โ the minimal absolute step size.xtola=0.01;doublein[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;doublein[0, inf)โ stop if the relative change of the criterion is below this. ๐gtola=0;doublein[0, inf)โ stop if the inf-norm of the gradient is below this value.maxiter=100;uintin[1, inf)โ stopping criterion: the maximum number of iterations.scale=2;doublein(1, inf)โ fallback fixed step size scaling.step=0.1;doublein(0, inf)โ initial step size. Gotta start somewhere ๐xtola=0;doublein[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;doublein(0, inf)โ for gradient based optimizers: stop when|grad| < eps; for simplex: stop when simplex size< eps.iter=100;uintin[1, inf)โ maximum number of iterations.opt=gd;dictโ the specific optimizer to be used. Supported values are:simplexโ Simplex algorithm of Nelder and Meadcg-frโ Flecher-Reeves conjugate gradient algorithmcg-prโ Polak-Ribiere conjugate gradient algorithmbfgsโ Broyden-Fletcher-Goldfarb-Shannbfgs2โ Broyden-Fletcher-Goldfarb-Shann (most efficient version)gdโ Gradient descent
step=0.001;doublein(0, inf)โ initial step size.tol=0.1;doublein(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;doublein[0, inf)โ stopping criterion: the absolute change of the objective value is below this value.ftolr=0;doublein[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;intin[1, inf)โ stopping criterion: the maximum number of iterations.opt=ld-lbfgs;dictโ the main minimization algorithm. Supported values are:gn-directโ Dividing Rectanglesgn-direct-lโ Dividing Rectangles (locally biased)gn-direct-l-randโ Dividing Rectangles (locally biased, randomized)gn-direct-noscalโ Dividing Rectangles (unscaled)gn-direct-l-noscalโ Dividing Rectangles (unscaled, locally biased)gn-direct-l-rand-noscaleโ Dividing Rectangles (unscaled, locally biased, randomized)gn-orig-directโ Dividing Rectangles (original implementation)gn-orig-direct-lโ Dividing Rectangles (original implementation, locally biased)ld-lbfgs-nocedalโ Noneld-lbfgsโ Low-storage BFGSln-praxisโ Gradient-free Local Optimization via the Principal-Axis Methodld-var1โ Shifted Limited-Memory Variable-Metric, Rank 1ld-var2โ Shifted Limited-Memory Variable-Metric, Rank 2ld-tnewtonโ Truncated Newtonld-tnewton-restartโ Truncated Newton with steepest-descent restartingld-tnewton-precondโ Preconditioned Truncated Newtonld-tnewton-precond-restartโ Preconditioned Truncated Newton with steepest-descent restartinggn-crs2-lmโ Controlled Random Search with Local Mutationld-mmaโ Method of Moving Asymptotesln-cobylaโ Constrained Optimization BY Linear Approximationln-newuoaโ Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximationln-newuoa-boundโ Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximationln-neldermeadโ Nelder-Mead simplex algorithmln-sbplxโ Subplex variant of Nelder-Meadln-bobyqaโ Derivative-free Bound-constrained Optimizationgn-isresโ Improved Stochastic Ranking Evolution Strategyauglagโ Augmented Lagrangian algorithmauglag-eqโ Augmented Lagrangian algorithm with equality constraints onlyg-mlslโ Multi-Level Single-Linkage (require local optimization and bounds)g-mlsl-ldsโ Multi-Level Single-Linkage (low-discrepancy-sequence, require local gradient based optimization and bounds)ld-slsqpโ Sequential Least-Squares Quadratic Programming
step=0;doublein[0, inf)โ initial step size for gradient free methods.stop=-inf;doubleโ stopping criterion: function value falls below this value.xtola=0;doublein[0, inf)โ stopping criterion: the absolute change of all x-values is below this value.xtolr=0;doublein[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 ๐
๐ COPYRIGHT ๐
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
- 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