binarymath


Purpose:

This program will compute intersections, additions, contrasts, and subtractions of pairs of binary files. It will also invert a single binary file.


Usage:

binarymath binary-file-1 operation binary-file-2 output [overwrite?(y/n)]

where the following definitions apply:
binary-file-1
the name of the first binary file
operation
one of the following:
add
returns 1's wherever either of the binary files are nonzero
contrast
returns 1's wherever the two binary files differ
intersect
returns 1's wherever both two binary files are nonzero
invert
returns 1's wherever binary-file-1 is 0 (binary-file-2 is ignored but must be specified to allow correct command line parsing).
subtract
returns 1's wherever binary-file-1 is 0 (binary-file-2 is ignored but must be specified to allow correct command line parsing).
binary-file-2
the name of the second binary file
output
the name of the output binary file
overwrite?(y/n)
'y' if ok to overwrite existing file output

Examples:

binarymath mask1 invert mask1 invertedmask1 y

Comments:


Error messages: (alphabetical by case)

See also: Generic error messages
Cannot understand operation ____

See also:


Modified: December 16, 2001
© 2001   Roger P. Woods, M.D.(rwoods@ucla.edu)