binarymath
This program will compute intersections, additions, contrasts, and subtractions of pairs
of binary files. It will also invert a single binary file.
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
binarymath mask1 invert mask1 invertedmask1 y
- binary file mask1.img is inverted to create binary file invertedmask1.img
- This program will not operate on normal (8 or 16 bit files). However, you can
achieve many of the binary functions by creating binary masks
based on the 8 or 16 bit files, operating on them and then
reapplying the masks to the original files.
See also: Generic error messages
- Cannot understand operation ____
-
- only the specified operations are supported
Modified: December 16, 2001
© 2001 Roger P. Woods, M.D.(rwoods@ucla.edu)