where v1 and v2 are the input volumes, w1 and w2 are floating point weights, and (OP) is the pointwise function for combining the two weighted input volumes. The output goes into v1.
Among the functions available are (by toggling the menu parameter ``function = '' as shown below):
``copy vol1 to vol2'' | ![]() |
``gray_and vol1 and vol2'' | grayscale logical AND |
``gray_or vol1 and vol2'' | grayscale logical OR |
``gray_xor vol1 and vol2'' | grayscale logical exclusive-or |
``gray_min vol1 and vol2'' | min![]() |
``gray_max vol1 and vol2'' | max![]() |
``vol1 != vol2'' | find all voxels in w1*v1 that differ from those in w2*v2 |
``vol1 set_diff vol2'' | find the nonzero voxels in w1*v1 that differ from |
those in w2*v2 | |
``vol1 == vol2'' | find the voxels in w1*v1 that equal those in w2*v2 |
``volume addition'' | ![]() |
``volume subtraction'' | ![]() |
``volume multiplic.'' | ![]() |
``volume division'' | ![]() |
The functions ``volume addition'' and ``volume multiplic.'' set the result to 255 if the computed result is > 255.
The function ``volume subtraction'' sets the output to 0 if w2* v2 > w1 * v1.
The function ``volume division'' sets the output to 255 if the product w2 *v2 = 0.
The functions gray_and, gray_or, and gray_xor work as the
corresponding logical operations and, or, and exclusive-or on
grayscale data. Any voxel having grayscale value > 0 is treated
logically as a 1; only 0 voxels are treated as logical 0's. For
each pair of corresponding voxels from the two input volumes, the
gray_and, gray_or, and gray_xor first check to see if the
logical condition is passed; if it is, the output assumes
the maximum grayscale value of the two voxels. For
example, if voxel (x,y,z) assumes the values v1(x,y,z) = 100
in v1 and v2(x,y,z) = 50 in v2 and w1 2.0 and w2 = 0.5, then
the gray_and, gray_or, and gray_xor output the following
values:
2.0 * 100 | gray_and | 0.5 * 50 ![]() |
2.0 * 100 | gray_or | 0.5 * 50 ![]() |
2.0 * 100 | gray_xor | 0.5 * 50 ![]() |
if instead v1(x,y,z) = 0 (and all else the same), then
2.0 * 0 | gray_and | 0.5 * 50 ![]() |
2.0 * 0 | gray_or | 0.5 * 50 ![]() |
2.0 * 0 | gray_xor | 0.5 * 50 ![]() |
function = copy vol1 to vol2The parameter ``function = '' should be toggled to the desired function.
vol1_weight = 1.000
vol2_weight = 1.000
second_volume = 0