﻿ Adjust/Compare Page > Image Algebra

# Image Algebra

The image algebra functionality in PFUS allows pixel-wise calculations with two studies, yielding a new result study. For instance, a baseline perfusion study can be subtracted from a stress study, and the result divided by the baseline to calculate a percent perfusion increase image.

Image algebra is entered by the button in the taskbar, the Image Algebra entry in the Menu, by the mode selection in the lower right corner or activating the Image Algebra button in the lower rigyht corner in the Initialize/Match page. As a result, a new tab +- appears to the right of the third image row which gives access to a panel containing arithmetic tools.

The example below illustrates image arithmetics by "unsharp masking". A MRI study has been loaded twice, as the Reference and also as a Input study. One of the image sets is displayed in the first row (A), the other one in the second row (B). The images in B are first smoothed with a 6 mm Gaussian filter available on the tools tab. Then the operation in the third row is configured to the - sign, and the button is activated. The difference image Reference (A) - Reslice (B) is calculated and shown in the third row, demonstrating enhanced edges. Operation Configuration

In general, operations of the form
(A OP1 number) OP2 (B OP3 number)
can be configured. This is achieved by setting the three operators OP1, OP2, OP3 with the option buttons illustrated below. The calculations are started by activating the button. Besides the standard operations there are the >, and < operators which perform comparisons and return the value itself if it satisfies the criterion, otherwise zero. The variants >B (binary) and <B return a binary mask image. For instance, the configuration results in a binary mask with 1 in all pixels where study A >10.0, and 0 elsewhere.

Min (Max) returns in each pixel the smaller (larger) value of both data sets. %Df calculates the percent difference by (A-B)/A*100, and similarly BLA calculates the percent difference by (A-B)/(A+B)/2*100. Note that the A and B operators allow restricting operations to only one image source. A tooltip of the functionality is obtained by moving the cursor after the configuration over the operator.

Important Note: In case the images are SHORT, any mathematical operation introduces a rounding error staring on 5th position after dot. If such error is not accepatble for processing, the solution is to convert the images to FLOAT representation. This can be easily achieved after loading in the Info dialog window activating Convert to Float. Please consider that when converting to FLOAT format the required memory size is doubled.

Mean and Standard Deviation of Images

Image algebra also provides a means to calculate the pixel-wise mean or standard deviation of a set of (matched) images. To this end load the images as Input images, set CoReg as the data range and activate the Aver or Stdv button. If the data range is set to Buffer, the average or standard deviation of all the image algebra results will be calculated. Using Algebra Results in further Calculations

The result studies of image algebra operations are displayed in the third row per default. However, they are also appended to the list of available studies, and they can be selected in the upper two rows as illustrated below. In this way, intermediate results can be made available for further calculations until the final result has been determined. Saving and Closing Algebra Results

The images resulting from image algebra can be saved from the +- panel, after activating the corresponding Close/Save/VOIs sub-tab. On the same panel, results can be closed if they are no longer needed. 