A stack-thresholded array is an array which has had stack-thresholding applied to it. See mean_stack_thresh(). It has 3 necessary attributes:

  • thresh is the threshold that was applied. This is either a number or an object of class th. Values in the original array which were less than this value are deemed to have failed the thresholding.

  • fail_value is the value to which elements of the array which failed the thresholding were set. This could be something like 0 or NA.

  • stack_thresh_method details which stacked-thresholding method was employed; this is either "mean" or "median".

stack_threshed_img(img, thresh, fail_value, stack_thresh_method)

Arguments

img

A 4-dimensional array in the style of an ijtiff_img (indexed by img[y, x, channel, frame]) or a 3-dimensional array which is a single channel of an ijtiff_img (indexed by img[y, x, frame]).

thresh

The threshold that was used. Either a number or an object of class th.

fail_value

The value to which elements of the array which failed the thresholding were set.

stack_thresh_method

This must be set to either "mean" or "median" to tell which stacked-thresholding method was employed.

Value

An object of class stack_threshed_img.