point_sets_from_tiffs {LOMAR} | R Documentation |
point_sets_from_tiffs
Description
Read in single molecule localization events from a series of 3D images in TIFF files where each image file represents a point set.
Usage
point_sets_from_tiffs(
image_dir = NULL,
pattern = NULL,
image.size = NULL,
sample.size = NULL,
sample.first = FALSE,
min.cardinality = NULL,
max.cardinality = NULL,
crop.size = NULL
)
Arguments
image_dir |
path to a directory containing the TIFF files. |
pattern |
regular expression, select images whose file path matches the given pattern. |
image.size |
vector of length 3 containing the size of the images along each dimension, e.g. c(40,40,40). |
sample.size |
if set, selects this number of images at random. A sample size larger than the available number of samples produces a warning and is ignored. |
sample.first |
if TRUE, samples are selected before applying any eventual filtering. This is more efficient as it avoids reading all data files. |
min.cardinality |
if set, filter out all point sets with less than the specified number of points. |
max.cardinality |
if set, filter out all point sets with more than the specified number of points. |
crop.size |
vector of length 3 containing the desired reduced size of the images along each dimension, e.g. c(30,30,30). |
Value
a list with two elements:
point.sets: a list of point sets as matrices with columns x,y,z and
file.names: a vector of paths to the TIFF files from which the point sets were extracted.
Examples
data.dir <- system.file("test_data/img", package = "LOMAR", mustWork = TRUE)
point_sets <- point_sets_from_tiffs(image_dir = data.dir, pattern = "\\.tiff?$",
image.size = c(64, 64, 4), min.cardinality = 10)