Image Arithmetics
Back to MIB | User interface | Menu | Image
Description
Apply custom arithmetic expressions using MATLAB syntax to modify the Image, Model, Mask, or Selection layers of the dataset.
Demonstrations
Limitations
Only in MIB for MATLAB
Enter a MATLAB expression in the
field to perform arithmetic operations on the dataset’s layers.Specify input datasets in the
field and the output destination in the field.Tip
Use the
dropdown to recall past successful expressions.Click the
button to execute the operation, or use the button to close the dialog without changes.Parameters and options
Conventions:
I, I1, I2 ...
: image layer; number indicates MIB container (I
is for the current dataset).O, O1, O2 ...
: model layer (O
is for the current model).M, M1, M2 ...
: mask layer (M
is for the current mask).-
S, S1, S2 ...
: selection layer (S
is for the current selection). -
: list datasets used in the expression (e.g.,I1, I2
for images from containers 1 and 2). I1
for image in container 1).
: specify the layer or
container to store the result (e.g., - : select from a list of previously executed expressions to populate the expression field.
- : enter the arithmetic operation to perform (see examples below).
Examples of arithmetic operations
I = I * 2
: increase intensity of all pixels in the current image by 2x.I2 = I2 + 100
: increase intensity of all pixels in image 2 by 100.I1 = I1 + I2
: add image from container 2 to container 1, returning result to container 1.I3 = I3 + mean(I3(:))
: add mean value of image 3 to image 3.I1 = I1 - min(I1(:))
: decrease intensity in image 1 by its minimum value.I(:,:,2,:) = I(:,:,2,:)*1.4
: increase intensity of the second color channel by 1.4x.I(I==0) = I(I==0)+100
: increase intensity of black areas by 100.disp(sum(abs(single(I1(:))-single(I2(:)))))
: find the difference between images in containers 1 and 2, printing to console (or usemsgbox(num2str())
for a message box).M2 = M1
: copy mask layer from image 1 to image 2.- Replace intensity of the second color channel in the masked area with 0.
Back to MIB | User interface | Menu | Image