detrend-directory {detrendr} | R Documentation |
Detrend all TIFF images in an entire folder.
Description
Batch processing. Apply any of the available detrending routines to detrend all of the TIFF images in a folder, saving the detrended images as TIFF files in the same folder.
Usage
dir_detrend_robinhood(
folder_path = ".",
swaps = "auto",
thresh = NULL,
quick = FALSE,
msg = TRUE
)
dir_detrend_rh(
folder_path = ".",
swaps = "auto",
thresh = NULL,
quick = FALSE,
msg = TRUE
)
dir_detrend_boxcar(
folder_path = ".",
l,
purpose = c("FCS", "FFS"),
thresh = NULL,
parallel = FALSE,
msg = TRUE
)
dir_detrend_exp(
folder_path = ".",
tau,
purpose = c("FCS", "FFS"),
thresh = NULL,
parallel = FALSE,
msg = TRUE
)
dir_detrend_polynom(
folder_path = ".",
degree,
purpose = c("FCS", "FFS"),
thresh = NULL,
parallel = FALSE,
msg = TRUE
)
Arguments
folder_path |
The path (relative or absolute) to the folder you wish to process. |
swaps |
The number of swaps (giving of one count from rich to poor) to
perform during the Robin Hood detrending. Set this to "auto" (the
default) to use Nolan's algorithm to automatically find a suitable value
for this parameter (recommended). For multi-channel images, it is possible
to have a different |
thresh |
The threshold or thresholding method (see
|
quick |
If |
msg |
Receive messages to tell you how the processing of the directory is going? Default is yes. |
l |
The length parameter for boxcar detrending. The size of the
sliding window will be |
purpose |
What type of calculation do you intend to perform on the
detrended image? If it is an FFS (fluorescence fluctuation spectroscopy)
calculation (like number and brightness), choose 'FFS'. If it is an FCS
(fluorescence correlation spectroscopy) calculation (like cross-correlated
number and brightness or autocorrelation), choose 'FCS'. The difference is
that if |
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 |
tau |
The |
degree |
The degree of the polynomial to use for the polynomial
detrending. This must be a positive integer. Set this to "auto" to use
Nolan's algorithm to automatically find a suitable value for this parameter
(recommended). For multi-channel images, it is possible to have a different
|
Details
These functions include a thresholding option, unlike their non-batch processing counterparts which they wrap (i.e. img_detrend_boxcar, img_detrend_exp and img_detrend_polynom). This is because, when working interactively, it's easy to threshold and then detrend, but for batch processing, it's not so easy to efficiently do one after the other, so it's nice to have that taken care of should you want it.
Value
Silently, a character vector of the paths to the detrended images.
Examples
## Not run:
setwd(tempdir())
file.copy(
c(
system.file("extdata", "bleached.tif", package = "detrendr"),
system.file("img", "2ch_ij.tif", package = "ijtiff")
),
"."
)
dir_detrend_robinhood(thresh = "huang")
dir_detrend_boxcar(l = "auto", thresh = "tri", purpose = "FFS")
dir_detrend_exp(tau = "auto", thresh = "tri", purpose = "FCS")
dir_detrend_polynom(degree = "auto", thresh = "huang", purpose = "FFS")
## End(Not run)