Multiple Data

Arithmetic

Data ProcessMultidataArithmetic

Data Arithmetic module makes possible to perform arbitrary point-wise operations on a single data field or corresponding points of several data fields (currently up to five). And although it is not its primary function it can be also used as a calculator with immediate expression evaluation. The expression syntax is described in section Expressions.

The data fields to operate on are called Operands and they are denoted d1, …, d5. The data fields that actually appear in the expression have to be compatible, i.e. their dimensions (both pixel and physical) have to be identical. Other data fields (i.e. those not actually entering the expression) are irrelevant. The result is always put into a newly created data field.

Examples:

-d1

performs value inversion – very similar to Invert Value, except that Invert Value reflects about the mean value while now we simply change all values to negative,

(d1 - d2)^2

calculates squared difference between two data fields.

In the calculator mode the expression is immediately evaluated as it is typed and the result is displayed below Expression entry. No special action is necessary to switch between data field expressions and calculator: expressions containing only numeric quantities are immediately evaluated, expressions referring to data fields are used to calculate a new data field.

Detail Immersion

Data ProcessMultidataImmerse

Immerse insets a detail, high-resolution image into a larger image. The image the function was run on forms the large, base image.

The detail can positioned manually on the large image with mouse. Button Improve can then be used to find the exact coordinates in the neighbourhood of the current position that give the maximum correlation between the detail and the large image. Or the best-match position can be searched through the whole image with Locate.

It should be noted the correlation search is insensitive to value scales and offsets, therefore the automated matching is based solely on data features, absolute heights play no role.

Result Sampling controls the size and resolution of the result image:

Upsample large image
The resolution of the result is determined by the resolution of the inset detail. Therefore the large image is scaled up.
Downsample detail
The resolution of the result is determined by the resolution of the large image. The detail is downsampled.

Detail Leveling selects the transform of the z  values of the detail:

None
No z value adjustment is performed.
Mean value
All values of the detail image are shifted by a constant to make its mean value match the mean value of the corresponding area of the large image.

Merging

Data ProcessMultidataMerge

Images that form parts of a larger image can be merged together with Merge. The image the function was run on forms corresponds to the base image, the image selected with Merge with represents the second operand. The side of the base image the second one will be attached to is controlled with Put second operand selector.

If the images match perfectly, they can be simply placed side by side with no adjustments. This behaviour is selected by option None of alignment control Align second operand.

However, usually adjustments are necessary. Option Correlation selects automated alignment by correlation-based search of the best match. The search is performed both in the direction parallel to the attaching side and in the perpendicular direction. If a parallel shift is present, the result is expanded to contain both images fully (with undefined data filled with a background value).

Option Boundary treatment is useful only for the latter case of imperfectly aligned images. It controls the treatment of overlapping areas in the source images:

First operand
Values in overlapping areas are taken from the first, base image.
Second operand
Values in overlapping areas are taken from the second image.
Smooth
A smooth transition between the first and the second image is made through the overlapping area by using a weighted average with a suitable weighting function.

Cross-Correlation

Data ProcessMultidataCross-correlation

Module finds local correlations between details on two different images. As an ideal output, the shift of every pixel on the first image as seen on the second image is returned. This can be used for determining local changes on the surface while imaged twice (shifts can be for example due to some sample deformation or microscope malfunction).

For every pixel on the first operand (actual window), the module takes its neighbourhood and searches for the best correlation in the second operand within defined area. The postion of the correlation maximum is used to set up the value of shift for the mentioned pixel on the first operand.

Second operand
Image to be used for comparison with the first operand - base image.
Search size
Used to set the area whera algoritgm will search for the local neighbourhood (on the second operand). Should be larger than window size. Increase this size if there are big differences between the compared images.
Window size
Used to set the local neighbourhood size (on the first operand). Should be smaller than search size. Increasing this value can improve the module functionality, but it will surely slow down the computation.
Output type
Determines the output (pixel shift) format.
Add low score threshold mask
For some pixels (with not very pronounced neighbourhood) the correlation scores can be small everywhere, but the algorithm anyway picks some maximum value from the scores. To see these pixels and possibly remove them from any further considerations you can let the module to set mask of low-score pixel shifts that have larger probability to be not accurately determined.

Mask by Correlation

Data ProcessMultidataMask by Correlation

Module searches for a given correlation pattern within the actual image. The resulting pattern position is marked as a mask in the data window.

Correlation kernel
Image to be found on the base image.
Output type
There are several possibilities what to output: local correlation maxima (single points), masks of kernel size for each correlation maximum (good for presentation purposes), or simply the correlation score.
Correlation method
Algorithm for computing correlation can be selected here.
Threshold
Threshold for determining whether the local maximum will be treated as “correlation kernel found here”.