mia-3dserial-nonrigid(1)
okay so bestie π«Ά welcome to mia-3dserial-nonrigid, fresh out of section 1 (General Commands Manual), and it's giving β¨serial 3D image registrationβ¨. no cap. let's get into it π
π NAME π
mia-3dserial-nonrigid β Serial registration of 3D images. that's the whole name, that's the whole vibe π
β¨ SYNOPSIS β¨
mia-3dserial-nonrigid -i <in-file> [options] <PLUGINS:3dimage/fullcost>
πΈ DESCRIPTION πΈ
so like, what does mia-3dserial-nonrigid actually do?? it runs the image registration of a consecutively numbered image series π¦
and the way it does it is serial β meaning it only registers images that are next to each other in time (i.e. consecutive numbers, iykyk), and then all the transformations it gets are applied accumulated so you reach the full registration. one after another after another, no skipping, periodt π
π OPTIONS π
π File-IO
-i,--in-file=(input, required); stringβ input perfusion data set. required, so like, you literally cannot skip it bestie π-o,--out-file=(output); stringβ file name for registered fiels (yes, "fiels" β that's what the original says, we keep it fr fr, we don't fix it) π
π Registration
-O,--optimizer=gsl:opt=gd,step=0.1β the optimizer used for minimization. for supported plugins seePLUGINS:minimizer/singlecost-l,--mg-levels=3β multi-resolution levels β¨-f,--transForm=splineβ transformation type. for supported plugins seePLUGINS:3dimage/transform-r,--ref=-1β reference frame (-1== use image in the middle) π
π«Ά Help & Info
-V,--verbose=warningβ verbosity of output; prints messages of the given level and higher priorities. 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β print copyright information-h,--helpβ print this help-?,--usageβ print a short help--versionβ print the version number and exit
βοΈ Processing
--threads=-1β Maxiumum number of threads to use for processing (typo preserved, bestie, it's part of the lore) π. This number should be lower or equal to the number of logical processor cores in the machine. (-1: 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- (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)
downscale β¨
Okay so this one downscales your input image by using a given block size to define the downscale factor. Before it scales, it filters the image with a smoothing filter to kill high-frequency data and dodge aliasing artifacts. No crunchy edges, bestie.
Supported parameters are:
b = [[1,1,1]]; 3dboundsβ 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β smoothing filter kernel to be applied. The size of the filter is estimated based on the blocksize. For supported plug-ins seePLUGINS:1d/spacialkernel.
erode πͺ¨
3d image stack erode filter. It's giving morphological erosion, periodt.
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.
gauss π
Isotropic 3D gauss filter. Smooth brain? No, smooth image. β¨
Supported parameters are:
w = 1; int in [0, inf)β filter width parameter.
gradnorm π
3D image to gradient norm filter.
- (no parameters) β it just does the gradient norm thing, no cap.
growmask π±
Use an input binary mask and a reference gray scale image to do region growing. It adds the neighborhood pixels of an already added pixel if they have a lower intensity that is above the given threshold. Region grow, bestie.
Supported parameters are:
min = 1; floatβ lower threshold for mask growing.ref =(input, required, io)β reference image for mask region growing. For supported file types seePLUGINS:3dimage/io.shape = 6n; factoryβ neighborhood mask. For supported plug-ins seePLUGINS:3dimage/shape.
invert π
Intensity invert filter. Flip those values, iconically.
- (no parameters) β no settings, just inversion energy.
isovoxel π§
This filter scales an image to make the voxel size isometric and its size to correspond to the given value. Isometric? We love a cube moment.
Supported parameters are:
interp = [bspline:d=3]; factoryβ interpolation kernel to be used. For supported plug-ins seePLUGINS:1d/splinekernel.size = 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 are stored as attribute in the image. Cluster queen.
Supported parameters are:
c = 3; int in [2, inf)β number of classes.
label π·οΈ
A filter to label the connected components of a binary image. Tagging everything like it's a group chat.
Supported parameters are:
n = 6n; factoryβ 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. Remap slay.
Supported parameters are:
map =(input, required, string)β Label mapping file.
labelscale π³οΈ
A filter that only creates output voxels that are already created in the input image. Scaling is done by using a voting algorithm that selects the target pixel value based on the highest pixel count of a certain label in the corresponding source region. If the region comprises two labels with the same count, the one with the lower number wins. Voting, but make it labels.
Supported parameters are:
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. Hot-swap the image, bestie.
Supported parameters are:
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 appears most times in the block is issued as output pixel in the target image. If two labels appear the same number of times, the one with the lower absolute value wins. Majority vote, but for labels.
Supported parameters are:
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 is taken from the parameters list and the other from the normal filter input. Both images must be of the same dimensions and one must be binary. The attributes of the image coming through the filter pipeline are preserved. The output pixel type corresponds to the input image that is not binary. Mask on, mask off.
Supported parameters are:
input =(input, required, io)β second input image file name. For supported file types seePLUGINS:3dimage/io.
mean π
3D image mean filter. Average it out, bestie.
Supported parameters are:
w = 1; int in [1, inf)β half filter width.
median ποΈ
Median 3d filter. The middle child of filters, literally.
Supported parameters are:
w = 1; int in [1, inf)β filter width parameter.
mlv π
Mean of Least Variance 3D image filter. MLV said stay calm.
Supported parameters are:
w = 1; int in [1, inf)β filter width parameter.
msnormalizer βοΈ
3D image mean-sigma normalizing filter. Normalize the vibe, periodt.
Supported parameters are:
w = 1; int in [1, inf)β half filter width.
open πͺ·
Morphological open. Opening up the image like a bloom.
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.
reorient π§
3D image reorientation filter. Turn it, flip it, rotate it β main character energy.
Supported parameters are:
map = xyz; dictβ 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 π
Resize an image. The original data is centered within the new sized image. Center it, bestie.
Supported parameters are:
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. Seasoning the image, but make it noise.
Supported parameters are:
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. Scale it up, scale it down.
Supported parameters are:
interp = [bspline:d=3]; factoryβ 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 = 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. Note that 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. Floating point first, bestie.
Supported parameters are:
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 creates 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. The input pixel must have an integral pixel type. Undefined? Spooky, but iconic.
- (no parameters) β no settings, just the biggest intensity taking the crown.
sepconv π§΅
3D image intensity separable convolution filter. Separable? We love an efficient queen.
Supported parameters are:
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. Note that 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. Same float warning, no cap.
Supported parameters are:
dir = x; dictβ Gradient direction. Supported values are:xβ gradient in x-directionyβ gradient in y-directionzβ gradient in z-direction
sws
Seeded watershed, bestie π§. This algorithm pulls out exactly as many regions as there are initial labels given in the seed image. Parameters it accepts:
grad = 0; boolβ treat the input image as a gradient.mark = 0; boolβ mark the segmented watersheds with a special grayscale value.n = [sphere:r=1]; factoryβ neighborhood used for the watershed region growing. For the plug-ins that work here, seePLUGINS:3dimage/shape.seed =(input, required, string)β the seed input image, which holds the labels for the initial regions.
tee
Saves your input image to a file and passes it straight through to the next filter. Like, it does both, no tradeoff π«Ά. Parameters:
file =(output, required, io)β name of the output file to save the image to. For the file types that work here, 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. Heads up though: this implementation only supports the 26 neighbourhood. That's it, that's the whole vibe.
- (no parameters)
transform
Transforms the input image with whatever transformation you hand it β¨. Parameters:
file =(input, required, io)β name of the file that contains the transformation. For the file types that work here, seePLUGINS:3dtransform/io.imgboundary = ; factoryβ overrides the image interpolation boundary conditions. For the plug-ins that work here, seePLUGINS:1d/splinebc.imgkernel = ; factoryβ overrides the image interpolator kernel. For the plug-ins that work here, seePLUGINS:1d/splinekernel.
variance
3D image variance filter, periodt. Parameters:
w = 1; int in [1, inf)β half filter width.
ws
Basic watershed segmentation π, no seed drama. Parameters:
evalgrad = 0; boolβ set this to1if your input image is not a gradient norm image.mark = 0; boolβ mark the segmented watersheds with a special grayscale value.n = [sphere:r=1]; factoryβ neighborhood for the watershed region growing. For the plug-ins that work here, seePLUGINS:3dimage/shape.thresh = 0; float in [0, 1)β relative gradient norm threshold. The real threshold value is computed asthresh * (max_grad - min_grad) + min_grad. Basins that are separated by gradients with a lower norm get joined together, iykyk.
π PLUGINS: 3dimage/fullcost π
image
A generalized image similarity cost function that also handles multi-resolution processing πͺ. The actual similarity measure you want gets handed in as an extra parameter. Parameters:
cost = ssd; factoryβ the cost function kernel. For the plug-ins that work here, seePLUGINS:3dimage/cost.debug = 0; boolβ save intermediate results for debugging.ref =(input, io)β reference image. For the file types that work here, seePLUGINS:3dimage/io.src =(input, io)β study image. For the file types that work here, seePLUGINS:3dimage/io.weight = 1; floatβ weight of the cost function.
labelimage
A similarity cost function that maps labels between two images and handles label-preserving multi-resolution processing π·οΈ. Parameters:
maxlabel = 256; int in [2, 32000]β maximum number of labels to consider.ref =(input, io)β reference image. For the file types that work here, seePLUGINS:3dimage/io.src =(input, io)β study image. For the file types that work here, seePLUGINS: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 so important: the masks you provide should be densely filled regions in multi-resolution processing, because otherwise the mask info can literally get lost when the image is downscaled. The mask may be pre-filtered β and after pre-filtering, the masks must be of bit-type. The reference mask and the transformed mask of the study image are combined with a binary AND. The actual similarity measure gets passed in as an extra parameter. Parameters:
cost = ssd; factoryβ cost function kernel. For the plug-ins that work here, seePLUGINS:3dimage/maskedcost.ref =(input, io)β reference image. For the file types that work here, seePLUGINS:3dimage/io.ref-mask =(input, io)β reference image mask (binary). For the file types that work here, seePLUGINS:3dimage/io.ref-mask-filter = ; factoryβ filter to prepare the reference mask image; the output must be a binary image. For the plug-ins that work here, seePLUGINS:3dimage/filter.src =(input, io)β study image. For the file types that work here, seePLUGINS:3dimage/io.src-mask =(input, io)β study image mask (binary). For the file types that work here, seePLUGINS:3dimage/io.src-mask-filter = ; factoryβ filter to prepare the study mask image; the output must be a binary image. For the plug-ins that work here, seePLUGINS:3dimage/filter.weight = 1; floatβ weight of the cost function.
taggedssd
Evaluates the Sum of Squared Differences similarity measure using three tagged image pairs π₯. The cost function value gets evaluated based on all the image pairs, but the gradient is composed by composing its component based on the tag direction. Parameters:
refx =(input, io)β reference image X-tag. For the file types that work here, seePLUGINS:3dimage/io.refy =(input, io)β reference image Y-tag. For the file types that work here, seePLUGINS:3dimage/io.refz =(input, io)β reference image Z-tag. For the file types that work here, seePLUGINS:3dimage/io.srcx =(input, io)β study image X-tag. For the file types that work here, seePLUGINS:3dimage/io.srcy =(input, io)β study image Y-tag. For the file types that work here, seePLUGINS:3dimage/io.srcz =(input, io)β study image Z-tag. For the file types that work here, seePLUGINS:3dimage/io.weight = 1; floatβ weight of the cost function.
πΎ 3dimage/io β the readers & writers bestie π
okay so these are literally the plugins that get your images in and out of the program. every one of them has its own lil set of file extensions it vibes with, and its own list of element types it can handle. let's go π¦
analyze β Analyze 7.5 image
the classic. reads/writes Analyze 7.5 format.
- 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
no files, no drama β it's just IO to and from the internal data pool β¨
- Recognized file extensions:
.@
dicom β Dicom image series as 3D
takes a whole Dicom image series and treats it like one 3D image, iconic behavior fr πΈ
- 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
like, it does everything. the range ππ
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
MetaIO 3D image IO using the VTK implementation (experimental).
π§ͺ experimental bestie β tread lightly, it's still in its testing era.
- 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
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.
that orientation detail? lowkey important, so don't skip it π
- 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
vti β 3D image VTK-XML in- and output
3D image VTK-XML in- and output (experimental).
π§ͺ experimental again β she's cute but she's in beta.
- 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
3D VTK image legacy in- and output (experimental).
π§ͺ yes bestie, experimental too. the legacy one is serving experimental energy π
- 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
π― 3dimage/maskedcost β cost functions, but with masking
same energy as the regular cost plugins, except these all understand masking π«Ά
lncc β local normalized cross correlation with masking support.,
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.,
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/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 see PLUGINS:1d/splinekernel
ncc β normalized cross correlation with masking support.
normalized cross correlation with masking support.
- (no parameters)
ssd β Sum of squared differences with masking.
Sum of squared differences with masking.
- (no parameters)
π· 3dimage/shape β neighborhoods, but make it geometry
these ones build little 3D shapes to define which pixels count as neighbors β¨
18n β 18n neighborhood 3D shape creator
18n neighborhood 3D shape creator
- (no parameters)
26n β 26n neighborhood 3D shape creator
26n neighborhood 3D shape creator
- (no parameters)
6n β 6n neighborhood 3D shape creator
6n neighborhood 3D shape creator
- (no parameters)
sphere β Closed spherical shape neighborhood including the pixels within a given radius r.,
Closed spherical shape neighborhood including the pixels within a given radius r., supported parameters are:
r = 2; float in (0, inf)β sphere radius.
a whole ball of pixels, obsessed π
π PLUGINS: 3dimage/transform π
Bestie, this is the whole squad of transformation plug-ins β every way you can yeet your volume around in space. Each one is basically a different "how many degrees of freedom am I allowed to move" situation. Let's go one by one. π
β¨ affine β¨
Affine transformation, ok? That's 12 degrees of freedom β the full send, no restrictions. Here's what you can tune:
imgboundary = mirror; factoryβ the boundary conditions for image interpolation. Wanna know which plug-ins you can slot in here? PeepPLUGINS:1d/splinebc. πimgkernel = [bspline:d=3]; factoryβ the image interpolator kernel, iykyk. Supported plug-ins live inPLUGINS:1d/splinekernel.
β¨ axisrot β¨
Restricted rotation transformation, and it's giving 1 degree of freedom. The transformation is locked to rotation around the given axis, about the given rotation center. Params:
axis =(required, 3dfvector)β the rotation axis. Required, so don't skip it bestie.imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.origin =(required, 3dfvector)β the center of the transformation. Also required!
β¨ raffine β¨
Restricted affine transformation, 3 degrees of freedom. The transformation is restricted to rotation around the given axis plus shearing along the two axes perpendicular to that one. Slay, but contained. Params:
axis =(required, 3dfvector)β the rotation axis.imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.origin =(required, 3dfvector)β the center of the transformation.
β¨ rigid β¨
Rigid transformation β that's rotation plus translation, six degrees of freedom. No squishing, no stretching, just vibes. Params:
imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.origin = [[0,0,0]]; 3dfvectorβ the relative rotation center. So like,<0.5,0.5,0.5>corresponds to the center of the volume. π―
β¨ rotation β¨
Rotation transformation, three degrees of freedom. Spinning, periodt. Params:
imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.origin = [[0,0,0]]; 3dfvectorβ the 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. The transformation is restricted to rotation around the x and y axes plus a bending along the x axis, independent in each direction, with the bending increasing with the squared distance from the rotation axis. It's giving β¨gentle curve energyβ¨. Params:
imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.norot = 0; boolβ set it so we don't optimize the rotation.origin =(required, 3dfvector)β the center of the transformation.
β¨ spline β¨
Free-form transformation that can be described by a set of B-spline coefficients and an underlying B-spline kernel. This is the main character of transformations ngl. Params:
anisorate = [[0,0,0]]; 3dfvectorβ anisotropic coefficient rate in pixels. Heads up: nonpositive values will be overwritten by theratevalue. πdebug = 0; boolβ enable additional debugging output.imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.kernel = [bspline:d=3]; factoryβ the transformation spline kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.penalty = ; factoryβ the transformation penalty energy term. Supported plug-ins: seePLUGINS:3dtransform/splinepenalty.rate = 10; float in [1, inf)β isotropic coefficient rate in pixels.
β¨ translate β¨
Translation, three degrees of freedom. Just moving, no rotating, no nothing. Params:
imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.
β¨ vf β¨
This plug-in implements a transformation that defines a translation for each point of the grid defining the domain of the transformation. Yes bestie, a whole translation field. π« Params:
imgboundary = mirror; factoryβ image interpolation boundary conditions. Supported plug-ins: seePLUGINS:1d/splinebc.imgkernel = [bspline:d=3]; factoryβ the image interpolator kernel. Supported plug-ins: seePLUGINS:1d/splinekernel.
π¦ PLUGINS: 3dtransform/io π¦
The plug-ins that handle reading and writing your 3D transformations. Pick your format, bestie. π
β¨ bbs β¨
Binary (non-portable) serialized IO of 3D transformations.
Non-portable, so don't expect this file to travel cute between machines. π
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 π
Penalty terms for your transformations β basically the "chill out, don't be too chaotic" energy. π§
β¨ divcurl β¨
divcurl penalty on the transformation. Params, bestie:
curl = 1; float in [0, inf)β penalty weight on curl.div = 1; float in [0, inf)β penalty weight on divergence.norm = 0; boolβ set it to1if the penalty should be normalized with respect to the image size.weight = 1; float in (0, inf)β weight of penalty energy.
β¨ PLUGINS: minimizer/singlecost β¨
okay bestie, this is the minimizer corner of the plugin world β the lil algorithms that actually go hunting for the minimum of your cost function. four of them, all with their own vibe π
πΈ gdas
Gradient descent with automatic step size correction. it just⦠walks downhill and fixes its own step as it goes. parameters:
ftolr = 0; double in [0, inf)β stop if the relative change of the criterion is below.. (yes, with the double period, that's just how she talks π)max-step = 2; double in (0, inf)β maximal absolute step size.maxiter = 200; uint in [1, inf)β stopping criterion: the maximum number of iterations.min-step = 0.1; double in (0, inf)β minimal absolute step size.xtola = 0.01; double in [0, inf)β stop if the inf-norm of the change applied toxis below this value..
π¦ gdsq
Gradient descent with quadratic step estimation. she's doing math to guess the step instead of vibing it. parameters:
ftolr = 0; double in [0, inf)β stop if the relative change of the criterion is below..gtola = 0; double in [0, inf)β stop if the inf-norm of the gradient is below this value..maxiter = 100; uint in [1, inf)β stopping criterion: the maximum number of iterations.scale = 2; double in (1, inf)β fallback fixed step size scaling.step = 0.1; double in (0, inf)β initial step size.xtola = 0; double in [0, inf)β stop if the inf-norm ofx-update is below this value..
π gsl
optimizer plugin based on the multimin optimizers of the GNU Scientific Library (GSL) https://www.gnu.org/software/gsl/. certified classic, no cap. parameters:
eps = 0.01; double in (0, inf)β gradient based optimizers: stop when|grad| < eps, simplex: stop when simplex size <eps..iter = 100; uint in [1, inf)β maximum number of iterations.opt = gd; dictβ specific optimizer to be used.. supported values are:simplexβ Simplex algorithm of Nelder and Meadcg-frβ Flecher-Reeves conjugate gradient algorithmcg-prβ Polak-Ribiere conjugate gradient algorithmbfgsβ Broyden-Fletcher-Goldfarb-Shannbfgs2β Broyden-Fletcher-Goldfarb-Shann (most efficient version)gdβ Gradient descent.
step = 0.001; double in (0, inf)β initial step size.tol = 0.1; double in (0, inf)β some tolerance parameter.
π₯ nlopt
Minimizer algorithms using the NLOPT library. for a description of the optimizers please see 'http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms'. yes that URL is http and yes it's long, we don't make the rules. parameters:
ftola = 0; double in [0, inf)β stopping criterion: the absolute change of the objective value is below this value.ftolr = 0; double in [0, inf)β stopping criterion: the relative change of the objective value is below this value.higher = inf; doubleβ higher boundary (equal for all parameters).local-opt = none; dictβ local minimization algorithm that may be required for the main minimization algorithm.. supported values are:gn-directβ Dividing Rectanglesgn-direct-lβ Dividing Rectangles (locally biased)gn-direct-l-randβ Dividing Rectangles (locally biased, randomized)gn-direct-noscalβ Dividing Rectangles (unscaled)gn-direct-l-noscalβ Dividing Rectangles (unscaled, locally biased)gn-direct-l-rand-noscaleβ Dividing Rectangles (unscaled, locally biased, randomized)gn-orig-directβ Dividing Rectangles (original implementation)gn-orig-direct-lβ Dividing Rectangles (original implementation, locally biased)ld-lbfgs-nocedalβ Noneld-lbfgsβ Low-storage BFGSln-praxisβ Gradient-free Local Optimization via the Principal-Axis Methodld-var1β Shifted Limited-Memory Variable-Metric, Rank 1ld-var2β Shifted Limited-Memory Variable-Metric, Rank 2ld-tnewtonβ Truncated Newtonld-tnewton-restartβ Truncated Newton with steepest-descent restartingld-tnewton-precondβ Preconditioned Truncated Newtonld-tnewton-precond-restartβ Preconditioned Truncated Newton with steepest-descent restartinggn-crs2-lmβ Controlled Random Search with Local Mutationld-mmaβ Method of Moving Asymptotesln-cobylaβ Constrained Optimization BY Linear Approximationln-newuoaβ Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximationln-newuoa-boundβ Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximationln-neldermeadβ Nelder-Mead simplex algorithmln-sbplxβ Subplex variant of Nelder-Meadln-bobyqaβ Derivative-free Bound-constrained Optimizationgn-isresβ Improved Stochastic Ranking Evolution Strategynoneβ don't specify algorithm
lower = -inf; doubleβ lower boundary (equal for all parameters).maxiter = 100; int in [1, inf)β stopping criterion: the maximum number of iterations.opt = ld-lbfgs; dictβ main minimization algorithm. supported values are:gn-directβ Dividing Rectanglesgn-direct-lβ Dividing Rectangles (locally biased)gn-direct-l-randβ Dividing Rectangles (locally biased, randomized)gn-direct-noscalβ Dividing Rectangles (unscaled)gn-direct-l-noscalβ Dividing Rectangles (unscaled, locally biased)gn-direct-l-rand-noscaleβ Dividing Rectangles (unscaled, locally biased, randomized)gn-orig-directβ Dividing Rectangles (original implementation)gn-orig-direct-lβ Dividing Rectangles (original implementation, locally biased)ld-lbfgs-nocedalβ Noneld-lbfgsβ Low-storage BFGSln-praxisβ Gradient-free Local Optimization via the Principal-Axis Methodld-var1β Shifted Limited-Memory Variable-Metric, Rank 1ld-var2β Shifted Limited-Memory Variable-Metric, Rank 2ld-tnewtonβ Truncated Newtonld-tnewton-restartβ Truncated Newton with steepest-descent restartingld-tnewton-precondβ Preconditioned Truncated Newtonld-tnewton-precond-restartβ Preconditioned Truncated Newton with steepest-descent restartinggn-crs2-lmβ Controlled Random Search with Local Mutationld-mmaβ Method of Moving Asymptotesln-cobylaβ Constrained Optimization BY Linear Approximationln-newuoaβ Derivative-free Unconstrained Optimization by Iteratively Constructed Quadratic Approximationln-newuoa-boundβ Derivative-free Bound-constrained Optimization by Iteratively Constructed Quadratic Approximationln-neldermeadβ Nelder-Mead simplex algorithmln-sbplxβ Subplex variant of Nelder-Meadln-bobyqaβ Derivative-free Bound-constrained Optimizationgn-isresβ Improved Stochastic Ranking Evolution Strategyauglagβ Augmented Lagrangian algorithmauglag-eqβ Augmented Lagrangian algorithm with equality constraints onlyg-mlslβ Multi-Level Single-Linkage (require local optimization and bounds)g-mlsl-ldsβ Multi-Level Single-Linkage (low-discrepancy-sequence, require local gradient based optimization and bounds)ld-slsqpβ Sequential Least-Squares Quadratic Programming
step = 0; double in [0, inf)β initial step size for gradient free methods.stop = -inf; doubleβ stopping criterion: function value falls below this value.xtola = 0; double in [0, inf)β stopping criterion: the absolute change of all x-values is below this value.xtolr = 0; double in [0, inf)β stopping criterion: the relative change of all x-values is below this value.
π EXAMPLE π
Run a serial registration of images inputXXXX.v (X digit) to reference image 20 and store the result in regXXXX.v. Optimize the sum of squared differences and spline transformations with coefficient rate 10.
mia-3dserial-nonrigid -i input0000.v -o 'reg%04d.v' -f spline:rate=10 -r
20 ssd
π AUTHOR(s) π
Gert Wollny
π COPYRIGHT π
This software is Copyright (c) 1999β2015 Leipzig, Germany and Madrid, Spain. It comes with ABSOLUTELY NO WARRANTY and you may redistribute it under the terms of the GNU GENERAL PUBLIC LICENSE Version 3 (or later). For more information run the program with the option --copyright.
and that's the whole page bestie, you made it to the end ππ the version on this one is v2.4.7 and the manpage date/attribution lives under USER COMMANDS for mia-3dserial-nonrigid(1) β go register something iconic, you ate fr fr π
β¨
π¦ where this page comes from
- 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