all_img_values

all_img_values#

stimupy.utils.all_img_values(img, mask)#

Isolate all image values/pixels, per target region specified in integer mask

Parameters:
  • img (numpy.ndarray) – Image-array of pixel values to be masked

  • mask (numpy.ndarray) – Array of same size as img. Each region-of-interest in mask is represented by an integer index. Each pixel inside this patch has this integer value. Patches do not need to be contiguous.

Returns:

Each image/element of the list is a numpy.ndarray representing an image. There is one image for each target patch in the integer mask. In each image all values are set to NaN except the ones corresponding to the target values of the respective target patch.

Return type:

list[numpy.arrays]

See also

img_values