mia-3dnonrigidreg-alt(1)
mia-3dnonrigidreg-alt ๐
okay bestie, welcome to the manual page for mia-3dnonrigidreg-alt, living in the General Commands Manual section (section 1, obviously, iykyk) โจ
NAME
mia-3dnonrigidreg-alt โ Non-linear registration of 3D images. ๐ง โจ
SYNOPSIS
mia-3dnonrigidreg-alt -o <out-transform> [options]
<PLUGINS:3dimage/fullcost>
DESCRIPTION
so mia-3dnonrigidreg-alt runs a non-rigid registration based on whatever cost criteria you hand it plus whatever transformation model you picked. ๐ฆ
now here's the tea: unlike its sibling mia-3dnonrigidreg, this one does not support special command line parameters for feeding it the images. nope! instead, the images get specified directly when you define the cost function. which honestly? iconic. because of that, you can run image registrations that optimize the alignment of more than one image pair at the same time ๐ฅ
โ ๏ธ but lowkey important: all input images must be of the same dimension (in pixels). no mixing, no matching, periodt.
OPTIONS
-o,--out-transformโ the output transformation. it's(output, required)and the type isio. for supported file types seePLUGINS:3dtransform/io๐พ-l,--levelsโ multi-resolution levels. default is3. ๐ช-O,--optimizerโ the optimizer used for minimization. default isgsl:opt=gd,step=0.1. for supported plugins seePLUGINS:minimizer/singlecostโ๏ธ-f,--transFormโ the transformation type (yes, that capital F is real, don't come for me). default isspline:rate=10. for supported plugins seePLUGINS:3dimage/transform๐
Help & Info ๐ซถ
-V,--verboseโ verbosity of output, prints messages of the given level and higher priorities. default iswarning. the supported priorities, starting at the lowest level, are:traceโ Function call tracedebugโ Debug outputinfoโ Low level messagesmessageโ Normal messageswarningโ Warningsfailโ Report test failureserrorโ Report errorsfatalโ Report only fatal errors
--copyrightโ prints the copyright information ๐-h,--helpโ prints this help-?,--usageโ prints a short help--versionโ prints the version number and exits ๐โโ๏ธ
Processing ๐ฅ
--threadsโ maxiumum number of threads to use for processing (yes bestie, "maxiumum" is how it's written, we love her anyway ๐). this number should be lower or equal to the number of logical processor cores in the machine. default is-1, which means automatic estimation. ๐งต
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. 0๏ธโฃ
(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 histogram. 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 histogram. for supported plug-ins seePLUGINS:1d/splinekernel
nccโ normalized cross correlation. ๐
(no parameters)
ngfโ this function evaluates the image similarity based on normalized gradient fields. 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). the 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. the supported values are:copyโ copy data when convertinglinearโ apply linear transformationx -> 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. the 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)
downscale ๐ซง
Bestie, this one shrinks your image: you hand it a block size, and that block size is your downscale factor. But first โ and this is the glow-up โ it filters the image with a smoothing filter to kill off the high frequency data so you don't get aliasing artifacts. โจ
the parameters are giving:
b = [[1,1,1]]; 3dboundsโ the blocksize.bx = 1; uint in [1, inf)โ blocksize in x direction.by = 1; uint in [1, inf)โ blocksize in y direction.bz = 1; uint in [1, inf)โ blocksize in z direction.kernel = gauss; factoryโ the smoothing filter kernel that gets applied, and the size of that filter is estimated from the blocksize. For supported plug-ins see PLUGINS:1d/spacialkernel
erode ๐ชจ
a 3d image stack erode filter, no cap. params:
hint = black; stringโ a hint about what the main image content is (black|white).shape = [sphere:r=2]; factoryโ the structuring element. For supported plug-ins see PLUGINS:3dimage/shape
gauss ๐ซ๏ธ
isotropic 3D gauss filter, slay. params:
w = 1; int in [0, inf)โ filter width parameter.
gradnorm ๐
3D image to gradient norm filter.
- (no parameters) โ she's low maintenance ๐
growmask ๐ฑ
take an input binary mask plus a reference gray scale image and do region growing: you add the neighborhood pixels of a pixel that's already been added, as long as they have a lower intensity that's still above the given threshold. it's giving fungus growth but make it medical imaging. ๐
params:
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/ioshape = 6n; factoryโ neighborhood mask. For supported plug-ins see PLUGINS:3dimage/shape
invert ๐
intensity invert filter. that's it, that's the whole vibe.
- (no parameters)
isovoxel ๐ง
this filter scales an image so that the voxel size becomes isometric and its size matches the value you give it. iconic behavior honestly.
params:
interp = [bspline:d=3]; factoryโ interpolation kernel to be used . For supported plug-ins see PLUGINS:1d/splinekernelsize = 1; float in (0, inf)โ isometric target voxel size.
kmeans ๐ฏ
3D image k-means filter. in the output image the pixel value represents the class membership, and the class centers get stored as an attribute in the image. cute AND informative.
params:
c = 3; int in [2, inf)โ number of classes.
label ๐ท๏ธ
a filter to label the connected components of a binary image.
params:
n = 6n; factoryโ 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 don't try this on your float data bestie, she will not cooperate.
params:
map =(input, required, string)โ Label mapping file.
labelscale ๐ณ๏ธ
a filter that only creates output voxels that already exist 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 if that region has two labels tied with the same count? the one with the lower number wins. democracy but make it labels. ๐ซก
params:
out-size =(required, 3dbounds)โ target size given as two coma separated values.
load ๐
load the input image from a file and use it to replace the current image in the pipeline. she just swaps in mid-flow.
params:
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 appears most times in that block gets issued as the output pixel in the target image. and if two labels show up the same number of times? the one with the lower absolute value wins. periodt.
params:
b = [[1,1,1]]; 3dboundsโ blocksize for the downscaling. Each block will be represented by one pixel in the target image..
mask ๐ญ
mask an image: one image comes from the parameters list and the other comes from the normal filter input. both images must be the same dimensions and one of them must be binary โ that's not a suggestion, that's the rules. ๐จ the attributes of the image coming through the filter pipeline are preserved, and the output pixel type corresponds to whichever input image is not binary.
params:
input =(input, required, io)โ second input image file name. For supported file types see PLUGINS:3dimage/io
mean โ
3D image mean filter.
params:
w = 1; int in [1, inf)โ half filter width.
median ๐๏ธ
median 3d filter.
params:
w = 1; int in [1, inf)โ filter width parameter.
mlv ๐ง
Mean of Least Variance 3D image filter.
params:
w = 1; int in [1, inf)โ filter width parameter.
msnormalizer ๐
3D image mean-sigma normalizing filter.
params:
w = 1; int in [1, inf)โ half filter width.
open ๐ธ
morphological open.
params:
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
reorient ๐งญ
3D image reorientation filter. spin that volume around, bestie.
params:
map = xyz; dictโ oriantation 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 ๐
resize an image. the original data is centered within the new sized image, so nothing gets shoved into a corner. ๐ซถ
params:
size = [[0,0,0]]; streamableโ new size of the image a size 0 indicates to keep the size for the corresponding dimension..
sandp ๐ง๐ถ๏ธ
salt and pepper 3d filter. season your image, literally.
params:
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 .
params:
interp = [bspline:d=3]; factoryโ interpolation kernel to be used . For supported plug-ins see PLUGINS:1d/splinekernels = [[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: the output pixel type of the filtered image is the same as the input pixel type, so converting the input beforehand to a floating point valued image is recommendable. don't say I didn't warn you.
params:
dir = x; dictโ Gradient direction. Supported values are:xโ gradient in x-directionyโ gradient in y-directionzโ gradient in z-direction
selectbig ๐
a filter that creats a binary mask representing the intensity with the highest pixel count. The pixel value 0 will be ignored, and if two intensities have the same pixel count, then the result is undefined โ so yeah, chaotic, proceed with caution ๐. The input pixel must have an integral pixel type.
- (no parameters)
sepconv ๐ช
3D image intensity separaple convolution filter. three kernels, three directions, one gorgeous separable moment.
params:
kx = [gauss:w=1]; factoryโ filter kernel in x-direction. For supported plug-ins see PLUGINS:1d/spacialkernelky = [gauss:w=1]; factoryโ filter kernel in y-direction. For supported plug-ins see PLUGINS:1d/spacialkernelkz = [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 disclaimer as her sister above: the output pixel type of the filtered image is the same as the input pixel type, so converting the input beforehand to a floating point valued image is recommendable.
params:
dir = x; dictโ Gradient direction. Supported values are:xโ gradient in x-directionyโ gradient in y-directionzโ gradient in z-direction
sws
okay so this one is the seeded watershed โ seeded meaning you tell it where to start. ๐ง The algorithm extracts exactly as many regions as initial labels are given in the seed image. no cap, your seed image is literally the blueprint.
Parameters, bestie:
grad = 0; boolโ set this and the input image gets read as a gradient. that's it, that's the job.mark = 0; boolโ turns on a special gray scale value so the segmented watersheds get marked. โจn = [sphere:r=1]; factoryโ the neighborhood for watershed region growing. want the plug-ins that work here? go look atPLUGINS:3dimage/shape. ๐seed =(input, required, string)โ the seed input image, aka the one holding the labels for the initial regions. required, so no skipping it, babe. ๐
tee
saves the input image to a file and passes it straight through to the next filter. it's giving "have your cake and eat it too" energy. ๐
file =(output, required, io)โ name of the output file to save the image to. supported file types live over atPLUGINS:3dimage/io.
thinning
3D morphological thinning, and it's built on some real ones: Lee and Kashyap, 'Building Skeleton Models via 3-D Medial Surface/Axis Thinning Algorithms', Graphical Models and Image Processing, 56(6):462-478, 1994. ๐
heads up: this implementation only supports the 26 neighbourhood. don't come at it with anything else.
- (no parameters) โ yeah, zero knobs. she just works. ๐
transform
transforms the input image with the given transformation. iconic. ๐
file =(input, required, io)โ name of the file containing the transformation. required! file types are listed inPLUGINS:3dtransform/io.imgboundary = ; factoryโ override the image interpolation boundary conditions. plug-ins for this live inPLUGINS:1d/splinebc.imgkernel = ; factoryโ override the image interpolator kernel. plug-ins for this one live inPLUGINS:1d/splinekernel.
variance
3D image variance filter. ๐
w = 1; int in [1, inf)โ half filter width. that's the whole parameter list, she's low maintenance.
ws
basic watershed segmentation. the O.G. no seeds, just vibes. ๐ฆ
evalgrad = 0; boolโ set it to1if your input image does not represent a gradient norm image. otherwise leave her alone.mark = 0; boolโ same deal as before: marks the segmented watersheds with a special gray scale value. โจn = [sphere:r=1]; factoryโ neighborhood for watershed region growing. supported plug-ins?PLUGINS:3dimage/shape, bestie.thresh = 0; float in [0, 1)โ relative gradient norm threshold. the actual threshold value isthresh * (max_grad - min_grad) + min_grad. basins separated by gradients with a lower norm will be joined. ๐
PLUGINS: 3dimage/fullcost
image
a generalized image similarity cost function that also handles multi-resolution processing. the actual similarity measure is given as an extra parameter, so you're never locked in. ๐ฆ
cost = ssd; factoryโ the cost function kernel. plug-ins for days over atPLUGINS:3dimage/cost.debug = 0; boolโ saves intermediate results so you can debug. lowkey a lifesaver when things go sideways. ๐ญref =(input, io)โ the reference image. file types:PLUGINS:3dimage/io.src =(input, io)โ the study image. file types:PLUGINS:3dimage/io.weight = 1; floatโ weight of the cost function. yes she's just a float, and yes she matters. ๐
labelimage
a similarity cost function that maps labels of two images and handles label-preserving multi-resolution processing. ๐ท๏ธ
maxlabel = 256; int in [2, 32000]โ the maximum number of labels to consider. she's capped at32000, don't push her.ref =(input, io)โ reference image. file types:PLUGINS:3dimage/io.src =(input, io)โ study image. file types:PLUGINS:3dimage/io.weight = 1; floatโ weight of the cost function.
maskedimage
a generalized masked image similarity cost function that also handles multi-resolution processing. ๐ญ
okay real talk, important caveat: the provided masks should be densely filled regions in multi-resolution processing, because otherwise the mask information may get lost when downscaling the image. the mask may be pre-filtered โ but 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 as an extra parameter.
cost = ssd; factoryโ cost function kernel. plug-ins over atPLUGINS:3dimage/maskedcost.ref =(input, io)โ reference image. file types:PLUGINS:3dimage/io.ref-mask =(input, io)โ reference image mask (binary). file types:PLUGINS:3dimage/io.ref-mask-filter = ; factoryโ filter to prepare the reference mask image, and the output must be a binary image. plug-ins:PLUGINS:3dimage/filter.src =(input, io)โ study image. file types:PLUGINS:3dimage/io.src-mask =(input, io)โ study image mask (binary). file types:PLUGINS:3dimage/io.src-mask-filter = ; factoryโ filter to prepare the study mask image, and again the output must be a binary image. plug-ins:PLUGINS:3dimage/filter.weight = 1; floatโ weight of the cost function. ๐
taggedssd
evaluates the Sum of Squared Differences similarity measure by using three tagged image pairs. ๐ท๏ธ๐ท๏ธ๐ท๏ธ here's the twist though: 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. so she's mixing and matching, and she knows exactly what she's doing.
refx =(input, io)โ reference image X-tag. file types:PLUGINS:3dimage/io.refy =(input, io)โ reference image Y-tag. file types:PLUGINS:3dimage/io.refz =(input, io)โ reference image Z-tag. file types:PLUGINS:3dimage/io.srcx =(input, io)โ study image X-tag. file types:PLUGINS:3dimage/io.srcy =(input, io)โ study image Y-tag. file types:PLUGINS:3dimage/io.srcz =(input, io)โ study image Z-tag. file types:PLUGINS:3dimage/io.weight = 1; floatโ weight of the cost function. โญ
six images, three tags, one iconic cost function. we're not done yet though, there's more coming, stay tuned bestie ๐ซถ
๐ฆ PLUGINS: 3dimage/io ๐ฆ
okay bestie this is the whole reader/writer squad โ every one of these cuties knows how to pull a 3D image in and push one back out, and they each claim their own file extensions like little territory flags ๐
analyze โ Analyze 7.5 image ๐ง
The classic. Old-school but iconic, fr fr.
Recognized file extensions: .HDR, .hdr
Supported element types:
unsigned 8 bitsigned 16 bitsigned 32 bitfloating point 32 bitfloating point 64 bit
datapool โ Virtual IO to and from the internal data pool ๐ซง
Not a file, not a vibe, it's virtual IO straight to and from the internal data pool. lowkey iconic.
Recognized file extensions: .@
dicom โ Dicom image series as 3D ๐ฉป
Takes a whole DICOM series and says "this is one 3D image now, periodt."
Recognized file extensions: .DCM, .dcm
Supported element types:
signed 16 bitunsigned 16 bit
hdf5 โ HDF5 3D image IO ๐ฆ
Recognized file extensions: .H5, .h5
Supported element types:
binary datasigned 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitsigned 64 bitunsigned 64 bitfloating point 32 bitfloating point 64 bit
inria โ INRIA image ๐ซ๐ท
Recognized file extensions: .INR, .inr
Supported element types:
signed 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating point 64 bit
mhd โ MetaIO 3D image IO using the VTK implementation (experimental). โ ๏ธ
heads up bestie, this one is experimental โ it's giving "we're still figuring it out" energy. no cap.
Recognized file extensions: .MHA, .MHD, .mha, .mhd
Supported element types:
signed 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating 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. yes, exactly like that, don't come for me.
Recognized file extensions: .NII, .nii
Supported element types:
signed 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitsigned 64 bitunsigned 64 bitfloating point 32 bitfloating point 64 bit
vff โ VFF Sun raster format โ๏ธ
Recognized file extensions: .VFF, .vff
Supported element types:
unsigned 8 bitsigned 16 bit
vista โ Vista 3D ๐
Recognized file extensions: .-, .V, .VISTA, .v, .vista
Supported element types:
binary datasigned 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating point 64 bit
vti โ 3D image VTK-XML in- and output (experimental). โ ๏ธ
another experimental one, bestie. proceed with love and a backup. ๐
Recognized file extensions: .VTI, .vti
Supported element types:
signed 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating point 64 bit
vtk โ 3D VTK image legacy in- and output (experimental). ๐๏ธ
legacy AND experimental? it's giving vintage-but-also-unstable, and honestly? respect. ๐
Recognized file extensions: .VTK, .VTKIMAGE, .vtk, .vtkimage
Supported element types:
signed 8 bitunsigned 8 bitsigned 16 bitunsigned 16 bitsigned 32 bitunsigned 32 bitfloating point 32 bitfloating point 64 bit
๐ PLUGINS: 3dimage/maskedcost ๐
this is the cost function crew, but make it masked. every one of them knows how to ignore the pixels you told it to ignore, slay. ๐ซถ
lncc โ local normalized cross correlation with masking support., supported parameters are: ๐
w = 5; uint in [1, 256]โ half width of the window used for evaluating the localized cross correlation. so like, the neighborhood it peeks at is built from this. ๐
mi โ Spline parzen based mutual information with masking., supported parameters are: ๐
cut = 0; float in [0, 40]โ Percentage of pixels to cut at high and low intensities to remove outliers. bye bye extremes, you will not be missed. โ๏ธ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/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 seePLUGINS:1d/splinekernel๐
ncc โ normalized cross correlation with masking support. ๐
(no parameters)
so unbothered. so effortless. no knobs to turn, just vibes.
ssd โ Sum of squared differences with masking. ๐งฎ
(no parameters)
also zero parameters, also zero drama.
โญ PLUGINS: 3dimage/shape โญ
shape makers!! these little guys build neighborhoods for you, and each one has its own whole personality.
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. it goes on forever bestie,(0, inf)fr fr, just pick your size. ๐ธ
๐ฆ PLUGINS: 3dimage/transform ๐ฆ
okay bestie this is THE section, the one where the actual moving-around-magic lives. every one of these is a transformation plug-in, and they all share some fam parameters (hi imgboundary and imgkernel, we know you), so watch for the repeats, they're not typos, they're just how it is ๐
affine</p> โ Affine transformation (12 degrees of freedom) ๐
the full-send one, 12 degrees of freedom, it can do a LOT. supported parameters are:
imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.
axisrot โ Restricted rotation transformation (1 degrees of freedom) ๐ธ
a lil baby rotation, only 1 degree of freedom. it's locked to rotating around the given axis, about the given rotation center. supported parameters are:
axis =(required, 3dfvector)โ rotation axis.imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.origin =(required, 3dfvector)โ center of the transformation.
raffine โ Restricted affine transformation (3 degrees of freedom) โจ
affine but on a leash: 3 degrees of freedom. it's restricted to rotating around the given axis plus shearing along the two axis perpendicular to it. supported parameters are:
axis =(required, 3dfvector)โ rotation axis.imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.origin =(required, 3dfvector)โ center of the transformation.
rigid โ Rigid transformation ๐ซถ
rotation and translation together, six degrees of freedom. yes bestie, the original really does put a stray period before the comma there, we're leaving it alone, not our business. supported parameters are:
imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.origin = [[0,0,0]](3dfvector) โ relative rotation center, i.e.<0.5,0.5,0.5>corresponds to the center of the volume. ๐ฏ
rotation โ Rotation transformation (three degrees of freedom) ๐
just rotation, three degrees of freedom, nothing extra. supported parameters are:
imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.origin = [[0,0,0]](3dfvector) โ relative rotation center, i.e.<0.5,0.5,0.5>corresponds to the center of the volume. ๐ฏ
rotbend โ Restricted transformation (4 degrees of freedom) ๐
4 degrees of freedom, and it's a whole vibe: rotation around the x and y axis, plus a bending along the x axis, independedn in each direction (that's the original's spelling, she's quirky, we love her), with the bending increasing with the squared distance from the rotation axis. supported parameters are:
imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.norot = 0(bool) โ don't optimize the rotation.origin =(required, 3dfvector)โ center of the transformation.
spline โ Free-form transformation ๐ง
the free-form icon, the main character fr. it can be described by a set of B-spline coefficients and an underlying B-spline kernel. supported parameters are:
anisorate = [[0,0,0]](3dfvector) โ anisotropic coefficient rate in pixels; nonpositive values will be overwritten by theratevalue. no cap.debug = 0(bool) โ enable additional debugging output. ๐imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.kernel = [bspline:d=3](factory) โ transformation spline kernel. supported plug-ins live atPLUGINS:1d/splinekernel.penalty =(factory) โ transformation penalty energy term. supported plug-ins live atPLUGINS:3dtransform/splinepenalty.rate = 10(float in [1, inf)) โ isotropic coefficient rate in pixels.
๐ heads up:penaltyhas no default value, it's literally just empty before the;. andanisorate's nonpositive values get clobbered byrate, so don't be out here setting negative numbers and expecting them to stick.
translate โ Translation (three degrees of freedom) ๐
just slides the whole thing, three degrees of freedom, honest work. supported parameters are:
imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.
vf โ vector field transformation ๐
this plug-in implements a transformation that defines a translation for each point of the grid defining the domain of the transformation. like, every point gets its own lil translation, bespoke. supported parameters are:
imgboundary = mirror(factory) โ image interpolation boundary conditions. for the plug-ins that play nice here, go look atPLUGINS:1d/splinebc.imgkernel = [bspline:d=3](factory) โ image interpolator kernel. supported plug-ins live atPLUGINS:1d/splinekernel.
๐พ PLUGINS: 3dtransform/io ๐พ
the ones that read and write your 3D transformations. save your work bestie, always. ๐ซถ
bbs โ Binary (non-portable) serialized IO of 3D transformations
- Recognized file extensions:
.bbs
โ ๏ธ it says non-portable right there in the name, so don't be shocked when it doesn't vibe with another machine.
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 ๐
the penalty section. this is where you tell the spline "no, bad, stop stretching like that" โ
divcurl โ 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.
note the brackets bestie:curlanddivare[0, inf)โ zero is allowed.weightis(0, inf)โ zero is not invited to this party, strictly greater than zero only. ๐
๐ธ gdas ๐ธ
gradient descent but it auto-corrects its own step size, so it's giving self-aware queen energy ๐
ftolr=0; double in [0, inf) โ bail out when the relative change of the criterion drops below this.max-step=2; double in (0, inf) โ the biggest absolute step size it's allowed to take.maxiter=200; uint in [1, inf) โ stopping criterion: the maximum number of iterations, periodt.min-step=0.1; double in (0, inf) โ the tiniest absolute step size.xtola=0.01; double in [0, inf) โ bail out when the inf-norm of the change applied to x drops below this.
๐ฆ gdsq ๐ฆ
gradient descent with quadratic step estimation, lowkey smarter than plain gd โจ
ftolr=0; double in [0, inf) โ bail out when the relative change of the criterion drops below this.gtola=0; double in [0, inf) โ bail out when the inf-norm of the gradient drops below this.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) โ bail out when the inf-norm of the x-update drops below this.
๐ง gsl ๐ง
an optimizer plugin riding on the multimin optimizers from the GNU Scientific Library (GSL) https://www.gnu.org/software/gsl/. iconic library, no cap.
eps=0.01; double in (0, inf) โ for gradient based optimizers: stop when |grad| < eps; for simplex: stop when the simplex size < eps.iter=100; uint in [1, inf) โ maximum number of iterations.opt=gd; dict โ which specific optimizer to use. Supported values are:simplexโ Simplex algorithm of Nelder and Meadcg-frโ Flecher-Reeves conjugate gradient algorithmcg-prโ Polak-Ribiere conjugate gradient algorithmbfgsโ Broyden-Fletcher-Goldfarb-Shannbfgs2โ Broyden-Fletcher-Goldfarb-Shann (most efficient version)gdโ Gradient descent
step=0.001; double in (0, inf) โ initial step size.tol=0.1; double in (0, inf) โ some tolerance parameter.
๐ nlopt ๐
minimizer algorithms via the NLOPT library. if you wanna read the whole tea on these optimizers, it's at 'http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms'. the 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 โ the local minimization algorithm that may be required for the main minimization algorithm. Supported values are:gn-directโ Dividing Rectanglesgn-direct-lโ Dividing Rectangles (locally biased)gn-direct-l-randโ Dividing Rectangles (locally biased, randomized)gn-direct-noscalโ Dividing Rectangles (unscaled)gn-direct-l-noscalโ Dividing Rectangles (unscaled, locally biased)gn-direct-l-rand-noscaleโ Dividing Rectangles (unscaled, locally biased, randomized)gn-orig-directโ Dividing Rectangles (original implementation)gn-orig-direct-lโ Dividing Rectangles (original implementation, locally biased)ld-lbfgs-nocedalโ Noneld-lbfgsโ Low-storage BFGSln-praxisโ Gradient-free Local Optimization via the Principal-Axis Methodld-var1โ Shifted Limited-Memory Variable-Metric, Rank 1ld-var2โ Shifted Limited-Memory Variable-Metric, Rank 2ld-tnewtonโ Truncated Newtonld-tnewton-restartโ Truncated Newton with steepest-descent restartingld-tnewton-precondโ Preconditioned Truncated Newtonld-tnewton-precond-restartโ Preconditioned Truncated Newton with steepest-descent restartinggn-crs2-lmโ Controlled Random Search with Local Mutationld-mmaโ Method of Moving Asymptotesln-cobylaโ Constrained Optimization BY Linear Approximationln-newuoaโ Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximationln-newuoa-boundโ Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximationln-neldermeadโ Nelder-Mead simplex algorithmln-sbplxโ Subplex variant of Nelder-Meadln-bobyqaโ Derivative-free Bound-constrained Optimizationgn-isresโ Improved Stochastic Ranking Evolution Strategynoneโ don't specify algorithm
lower=-inf; double โ lower boundary (equal for all parameters).maxiter=100; int in [1, inf) โ stopping criterion: the maximum number of iterations.opt=ld-lbfgs; dict โ 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; double in [0, inf) โ initial step size for gradient free methods.stop=-inf; double โ stopping criterion: the 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 ๐
so bestie, say you wanna register image test.v onto image ref.v using a spline transformation with a coefficient rate of 5, and write the registered image out to reg.v. you want two multiresolution levels, ssd as the image cost function, and divcurl weighted by 10.0 as the transformation smoothness penalty. the resulting transformation gets saved in reg.vf. here's the whole vibe:
mia-3dnonrigidreg-alt -o reg.vf -l 2 -f spline:rate=3
image:cost=ssd,src=test.v,ref=ref.v divcurl:weight=10
๐ AUTHOR(s) ๐
Gert Wollny โ the actual main character who wrote this ๐ซถ
๐ COPYRIGHT ๐
okay bestie, the legal bit, but make it cute โจ this software is Copyright (c) 1999โ2015 Leipzig, Germany and Madrid, Spain. two cities, one iconic codebase, we love to see it ๐ซถ
and now the part where the lawyers get loud: it comes with ABSOLUTELY NO WARRANTY. like, none. zero. nada. it's giving "you're on your own, bestie" ๐ญ so pls don't come for anybody if it does a little something silly.
but the good news?? you may redistribute it under the terms of the GNU GENERAL PUBLIC LICENSE Version 3 (or later). so go forth, share it, remix it, be free ๐ just respect the license, periodt.
- want the full deets? for more information run the program with the option
--copyright๐
and that's the whole page, bestie!! ๐ this was mia-3dnonrigidreg-alt(1) from the USER COMMANDS manual, v2.4.7 โ check that lil date stamp down at the bottom too, that's when this beauty got written up ๐ you made it all the way through all seven parts, which is main character energy fr fr ๐๐ go register something nonrigidly, you've earned it. no cap. byeee ๐ฆโจ
๐ฆ where this page comes from
- debian bookworm: mia-tools 2.4.7-11+b1 ยท GPL-3.0-or-later
- ubuntu jammy: mia-tools 2.4.7-8ubuntu1 ยท GPL-3.0-or-later
- ubuntu noble: mia-tools 2.4.7-13build4 ยท 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