PROCESSMEDIMAGES Procedure

Processing Statements

The following list provides more details about some of the statements in PROC PROCESSMEDIMAGES:

  • The BIOLABEL statement extracts connected components—that is, collections of foreground pixels that form 2-D or 3-D blobs (binary large objects)—from an image. Each connected component is assigned a unique pixel intensity value that is referred to as a label. The labels are consecutive and nonnegative, and they skip the value that you specify in the OUTPUTBACKGROUND= option. The output image of this statement has pixels of the unsigned long type.

  • The CLAMP statement maps the image pixel intensities to a closed interval (or "clamp") that you specify. For example, if the interval is [100, 200], the image pixel intensities 25, 150, and 255 are mapped to 100, 150, and 200, respectively. For this statement, you should specify the intensity interval that you want to apply to all images in the image table.

  • The THRESHOLD statement converts an image to a segmentation image by using the algorithm that is associated with the value that you specify in the TYPE= option:

    • BASIC creates a binary segmentation image by comparing the intensity value of each pixel in the input image to user-specified threshold values. A pixel whose intensity value is less than the LOW= option value and greater than the HIGH= option value is assigned 0 in the output image. A pixel whose intensity value falls between these two option values is assigned 255 in the output image. The values that you specify in the LOW= and HIGH= options apply to all images in the input table.

    • OTSU creates a segmentation image by using Otsu’s method, which attempts to determine the region that each pixel belongs to. A region is an interval of pixel intensity values that is used to classify pixels in the image. For example, you can use a two-region classification to identify regions as part of the foreground or background. Each region is determined from the pixel histogram of the image. Regions are selected to minimize the variance within each region and maximize the variance between regions. Use the BINS= option to specify the number of bins in the pixel histogram. Use the REGIONS= option to specify the number of regions in the output image. The values that you specify in the BINS= and REGIONS= options apply to all images in the input table.

  • The THRESHOLDSPECIFIC statement, like the THRESHOLD statement, converts an image to a segmentation image by using the algorithm that is associated with one of the following values that you specify in the TYPE= option. But it does this by specifying columns instead of constants for each option.

    • BASIC creates a binary segmentation image by using the same algorithm that the TYPE=BASIC option in the THRESHOLD statement uses. Use the LOW= option to specify a column that contains the lower threshold. Use the HIGH= option to specify a column that contains the upper threshold.

    • OTSU creates a segmentation image by using the same algorithm that the TYPE=OTSU option in the THRESHOLD statement uses. Use the BINS= option to specify a column that contains the number of bins to use. Use the REGIONS= option to specify a column that contains the number of regions to use.

Last updated: March 26, 2026