TH M - Threshold - Create Mask based on Threshold

(9/26/14)

PURPOSE

Creates a mask (consisting of pixels valued at either 1 or 0) based on thresholding of an image or volume.   Example.

SEE ALSO

TH [Threshold - Set pixels above/below Threshold to Threshold]
TH F [Threshold - Set pixels above/below Threshold to Fixed value]

USAGE

.OPERATION: TH M [num]
[This operation can return one optional register variable:
Variable Example Receives
First [num] Number of positive pixels/voxels

.INPUT FILE: AVG001
[Enter the name of the file to be searched. Depending upon the value of a pixel as compared with the threshold, the corresponding pixel in the mask is set to 0 or 1.]

.OUTPUT FILE: MSK001
[Enter the name of the output file.]

.BLANK OUT (A)BOVE THRESHOLD OR (B)ELOW THRESHOLD (A/B): A
[Option 'A': Mask is filled with 1's wherever the pixel values do not exceed the threshold, and with 0's elsewhere.

Option 'B': 'B': Mask is filled with 1's wherever the pixel values exceed the threshold, and with 0's elsewhere.]

.THRESHOLD: 1.4
[Enter the threshold to be used in the search of the input image/volume.]

NOTES

  1. Optional output register variable will receive number of positive pixels/voxels in mask file.

SUBROUTINES

THRESH

CALLER

UTIL2