Unlimited learning, half price | 50% off
Get 50% off unlimited learning

nandb (version 0.2.1)

NumberTimeSeries: Create a number time-series.

Description

Given a stack of images arr3d, use the first frames.per.set of them to create one number image, the next frames.per.set of them to create the next number image and so on to get a time-series of number images. If tau is specified, bleaching correction is performed via CorrectForBleaching().

Usage

NumberTimeSeries(arr, frames.per.set, tau = NA, mst = NULL, filt = NULL,
  n.ch = 1, verbose = FALSE, mcc = parallel::detectCores(), seed = NULL)

Arguments

arr

A 3-dimensional array (the image stack) where the nth slice is the nth image in the time series. To perform this on a file that has not yet been read in, set this argument to the path to that file (a string).

frames.per.set

The number of frames with which to calculate the successive numbers.

tau

If this is specified, bleaching correction is performed with CorrectForBleaching() which uses exponential filtering with time constant tau (where the unit of time is the time between frames). If this is set to 'auto', then the value of tau is calculated automatically via BestTau().

mst

Do you want to apply an intensity threshold prior to calculating number (via autothresholdr::mean_stack_thresh())? If so, set your thresholding method here.

filt

Do you want to smooth (filt = 'smooth') or median (filt = 'median') filter the number image using SmoothFilterB() or MedianFilterB() respectively? If selected, these are invoked here with a filter radius of 1 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.

n.ch

The number of channels in the image (default 1).

verbose

If arr3d is specified as a file name, print a message to tell the user that that file is now being processed (useful for NumberTxtFolder, does not work with multiple cores).

mcc

The number of cores to use for the parallel processing.

seed

If using parallel processing (mcc > 1), a seed for the random number generation for BestTau. Don't use set.seed, it won't work.

Value

An array where the ith slice is the ith number image.

Details

This may discard some images, for example if 175 frames are in the input and frames.per.set = 50, then the last 25 are discarded. If bleaching correction is selected, it is performed on the whole image stack before the sectioning is done for calculation of numbers.

See Also

Number().

Examples

Run this code
# NOT RUN {
library(EBImage)
img <- ReadImageData(system.file('extdata', '50.tif', package = 'nandb'))
bts <- NumberTimeSeries(img, 20, tau = NA, mst = "Huang", mcc = 2)
# }

Run the code above in your browser using DataLab