next up previous
Next: ``threshold'' -- intensity Up: Manipulation Previous: ``copy vol1 to

 

``two-volume ops'' -- pointwise functions combining 2 volumes

 

purpose:
Perform simple arithmetic and logical pointwise operations that combine two volumes. The general form of operations possible here is the following:

 

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):

 

All operations are rounded to 8-bit arithmetic.

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 v2 v1.

The function ``volume division'' sets the output to 255 if the product 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 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:

 

 

if instead v1(x,y,z) = 0 (and all else the same), then

 

input:
Two different 8-bit volumes.
output:
An 8-bit volume containing the processed result.
parameters:
Default parameters menu is
function = copy vol1 to vol2
* volume1 weight = 1.000
* volume2 weight = 1.000
* first volume = 0
* second volume = 0
* copy output to vol # = 1
*
The parameter ``function = '' should be toggled to the desired function.
comments:
 
  1. When the weights = 1.0, the function is fairly fast (except multiply and divide). When weights differ from 1.0, the function becomes much slower.



next up previous
Next: ``threshold'' -- intensity Up: Manipulation Previous: ``copy vol1 to



 

Philip Americus
The Multidimensional Image Processing Lab
Fri Aug 30 10:26:42 EDT 1996