Operator for line offset correction in confocal laser scanning microscope image.
For fast image acquisition, confocal laser scanning microscopes offer bidirectional scanning, i.e. a line is scanned from left to right, then the next line is scanned from right to left using the return path of the scanner. Thus each second line is scanned in the other direction compared to neighboring lines. This scanning technique introduces an offset between lines, which is manually corrected before acquisition. Because of the noisy image data the manual correction is not optimal, thus a small offset remains.
This operator uses optical flow (global translational flow in x-dimension) to estimate the remaining offset between adjacent lines. The offset is estimated in a hierarchical manner from coarse to fine resolution. A maximum line offset must be given to determine the number of scales necessary to capture the present offset. The algorithm computes mean values along the z-dimension as adjacent z-slices are assumed to be most correlated compared with t- and c-steps. The estimation of the offset from mean values seems to be more stable than from the raw (poisson-)noisy data. The reduction in dimensionality also reduces the computational effort.
Input image:
Image to be corrected
Maximum line-offset:
The maximum line-offset used to determine the number of hierarchical steps
Compute mean along z:
Flag to average image intensities along the z-axis (see description above)
Keep datatype:
Flag to use the datatype of the input image for the output image. Otherwise the output image usually will be of type MTBImageType.MTB DOUBLE due to interpolation.
Estimated line-offset:
The estimated line-offset
Result image:
Corrected image