Image Algebra - Introduction
The Image Algebra tool can be used to perform algebraic operations
on images. You can perform transforms on single images, or combine
multiple images, and even perform simple linear regression on images.
You can view the result, or you can save it to disk as a new
image, for later retrieval, viewing and analysis.
Start the Image Algebra tool from the Process
menu:
The Image Algebra frame will now appear as shown below:
The procedure for performing image algebra can be summarised as
follows:
- Decide how many images you want to work with. For example,
for an magnetisation transfer ratio (MTR) calculation, you will
use two images (the images without and with off-resonance
saturation pulses). For a simple image subtraction you will be
working with two images. Click on the button until you
have the correct number of image selection panels in the "Input
images" pane. If you have too many images, you can remove any of
them by clicking on the icon.
- The pixel intensity in each input image has a name by which
it is referred to in the formula. By default, these names are I1,
I2, I3 etc. However, you can change the name to reflect the
meaning of these images. For example, you if are performing an MTR
calculation, you might want to refer to the image without the
saturation pulses as "M0", and the image with saturation pulses as
"Ms". If you wish, alter the name in the Name field at the right
hand side of each input image.
- Enter your formula. The formula can use:
- The operators *, /, +, - and ^ that can be seen in the
Operators
menu. You can also use parentheses (..).
- Any of the built in functions that can be seen in
Functions
menu.
- The constants pi and e that can be seen in the
Constants
menu.
- The variable names that you set for your input images (for
example M0 and Ms in the example above).
You can either type in the formula, or use the Operators
,
Functions
and Constants
menu to insert text into the formula.
- For each of the input images, set an input image file by
clicking on the load image icon: . This will
bring up a File Chooser that you
can use to set the input image corresponding to the variable name
on the right. Alternatively, you simply type in the folder and
image file name in the text fields, or by pressing the right mouse
button and selecting from the menu of recently-used images.
Each input image must be of the same dimensionality (i.e., the
same number of slices, and rows and columns within the slice). The
Algebra tool then works through every pixel in the set of input
images, and applies the formula to produce a single output image
derived from a combination of the input images.