Given a time stack of images, brightness()
performs a calculation of the
brightness for each pixel.
brightness(
img,
def,
thresh = NULL,
detrend = FALSE,
quick = FALSE,
filt = NULL,
s = 1,
offset = 0,
readout_noise = 0,
parallel = FALSE
)
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] ). |
def |
A character. Which definition of brightness do you want to use,
"B" or "epsilon" ? |
thresh |
The threshold or thresholding method (see
autothresholdr::mean_stack_thresh() ) to use on the image prior to
detrending and brightness calculations. |
detrend |
Detrend your data with detrendr::img_detrend_rh() . This is
the best known detrending method for brightness analysis. For more
fine-grained control over your detrending, use the detrendr package. If
there are many channels, this may be specified as a vector, one element for
each channel. |
quick |
If FALSE (the default), the swap finding routine is run
several times to get a consensus for the best parameter. If TRUE , the
swap finding routine is run only once. |
filt |
Do you want to smooth (filt = 'mean' ) or median (filt = 'median' ) filter the number image using smooth_filter() or
median_filter() respectively? If selected, these are invoked here with a
filter radius of 1 (with corners included, so each median is the median of
9 elements) and with the option na_count = TRUE . If you want to
smooth/median filter the number image in a different way, first calculate
the numbers without filtering (filt = NULL ) using this function and then
perform your desired filtering routine on the result. If there are many
channels, this may be specified as a vector, one element for each channel. |
s |
A positive number. The \(S\)-factor of microscope acquisition. |
offset |
Microscope acquisition parameters. See reference
Dalal et al. |
readout_noise |
Microscope acquisition parameters. See reference
Dalal et al. |
parallel |
Would you like to use multiple cores to speed up this
function? If so, set the number of cores here, or to use all available
cores, use parallel = TRUE . |
Value
A matrix, the brightness image.
References
Digman MA, Dalal R, Horwitz AF, Gratton E. Mapping the Number of
Molecules and Brightness in the Laser Scanning Microscope. Biophysical
Journal. 2008;94(6):2320-2332. doi: 10.1529/biophysj.107.114645
.
Dalal, RB, Digman, MA, Horwitz, AF, Vetri, V, Gratton, E (2008).
Determination of particle number and brightness using a laser scanning
confocal microscope operating in the analog mode. Microsc. Res. Tech., 71,
1:69-81. doi: 10.1002/jemt.20526
.
Examples
#> Reading 50.tif: an 8-bit, 50x50 pixel image of unsigned
#> integer type. Reading 1 channel and 50 frames . . .
#> Done.
#> Using basic display functionality.
#> * For better display functionality, install the EBImage package.
#> * To install `EBImage`:
#> - Install `BiocManager` with `install.packages("BiocManager")`.
#> - Then run `BiocManager::install("EBImage")`.
b <- brightness(img, "e", thresh = "Huang")
b <- brightness(img, "B", thresh = "tri")
# }