binarymask
Purpose:
This program will apply a binary mask to a file. Any voxel where
the mask has a value of zero will generate an output value of zero.
Any voxel where the mask is nonzero will retain the input value.
Usage:
binarymask input
maskfile
output
[overwrite?(y/n)]
- where the following definitions apply:
- input
- the name of the 8 or 16 bit input file
- maskfile
- the name of the binary mask file (8 or 16 bit files will
not be accepted)
- output
- the name of the output file
- overwrite?(y/n)
- 'y' if you want to allow overwriting of existing files
output
Examples:
binarymask originalmri bineditedmri editedmri y
- The binary mask in bineditedmri.img will be applied to the
image originalmri.img to create editedmri.img
Comments:
- If the file being masked has more planes than the binary mask
file, the excess planes will be truncated and a warning will be
issued.
Error messages: (alphabetical by
case)
See also: Generic error messages
- WARNING, mask and data have different units, check
headers
- ____ planes trucated
- the 8 or 16 bit file had more planes than the mask, the
excess planes were truncated
- subroutine mask() received unexpected number of
bits/pixel
- shouldn't happen: indicates a programming error or
incorrect compilation of the AIR package. The AIR library and
the main programs should be compiled with the same number of
bits/pixel.
- unable to mask due to incompatible dimensions:
- the two files have different x and y dimensions or the
binary mask has more planes than the normal file. Use
scanheader to review the file
dimensions.
See also:
Modified: December 11, 1996
© 1995-6 Roger P. Woods,
M.D.(rwoods@ucla.edu)