pixSum: Sum pixel intensity above threshold

Description Usage Arguments Value Examples

View source: R/pixSum.R

Description

In this function, we use the input from the quantCutoff function to sum the pixel intensity in the fraction above the threshold for individual images.

Usage

1
pixSum(imageList, quantCutThreshold)

Arguments

imageList

Either a named list of images, as with the example file, or a vector of RGB png file names, e.g. generated with list.files(). The second option is preferred, as this is a more reasonable method from a memory perspective.

quantCutThreshold

A result from the quantCutoff function on a relevant control dataset. NB! The same controls can be included in the imageList too.

Value

A named vector with the sum of pixel intensities above the quantCutThreshold normalized to the total number of pixels in the frame.

Examples

1
2
3
4
5
6
7
8
#Load example data.
data(testImages)

#Run the function with the output in the current directory
pixSum(testImages, quantCutoff(testImages[1], 0.99))
#Expected result:
#       A33        P79
#0.00140716 0.02007561

jtheorell/pixSum documentation built on April 2, 2020, 5:03 a.m.