magickCell: Funcion copada para mostrar fotos de Cell-ID basada en magick

magickCellR Documentation

Funcion copada para mostrar fotos de Cell-ID basada en magick

Description

El uso más básico es magickCell(cdata=cell.data$data, paths=cell.data$images).

Para mostrar algunas celulas en particular, solo hay que pasarle un cdata filtrado.

Ver la descripción de argumentos más abajo para aprender sobre las opciones.

Al fondo, en los detalles, hay una descripción de como debería ser el paths dataframe.

Usage

magickCell(
  cdata,
  paths,
  max_composite_size = 1000,
  cell_resize = NULL,
  boxSize = 80,
  n.cells = 25,
  equalize_images = F,
  normalize_images = F,
  ch = "BF.out",
  sortVar = NULL,
  seed = NULL,
  .debug = FALSE,
  return_single_imgs = FALSE,
  return_ucid_df = FALSE,
  annotation_params = list(color = "white", background = "black"),
  stack_vertical_first = FALSE,
  return_raw = FALSE
)

Arguments

cdata

A Rcell data.frame (not the object).

paths

A paths dataframe with file path, t.frame, position and channel information of each picture.

max_composite_size

Maximum size of the final composite image (this resize is applied last) in pixels. 1000 by default.

cell_resize

Resize string for the individual cell images (NULL translates to boxSizexboxSize by default).

boxSize

Size of the box containing the individual cell images. 50 by default.

n.cells

maximum number of cells to display.

equalize_images

Use magick's function to "equalize" the image when TRUE (FALSE by default).

normalize_images

Use magick's function to "normalize" the image when TRUE (FALSE by default).

ch

Name of the CellID channel (BF, BF.out, RFP, etc.). "BF.out" by default.

sortVar

Variable name used to sort the rows after sampling if a seed was specified. NULL by default, to preserve the original or random sampling order.

seed

Seed value for sampling of cell images. NULL by default, to disable sampling.

.debug

Print more messages if TRUE.

return_single_imgs

If TRUE, return a vector of images instead of a tile.

return_ucid_df

If TRUE, return is a list of magick images and ucid dataframes.

annotation_params

Set to NULL to skip annotations, or a named list with values for magick::annotate options (one or more of the names "color" "background" "size"). Note that size close to zero can be invisible.

stack_vertical_first

Set to TRUE to stack images vertically first (useful when return_single_imgs = T).

return_raw

Returns loaded images prematurely (i.e. without any processing other than magick::image_read and magick::image_crop).

Details

Paths dataframe structure. Output example from glimpse(paths):

Columns: 6
$ pos     <int> 1
$ t.frame <int> 0
$ channel <chr> "YFP"
$ image   <chr> "picture_filename.tif"
$ path    <chr> "/path/to/directory/with/pictures/"
$ file    <chr> "/path/to/directory/with/pictures/picture_filename.tif"
$ is.out  <lgl> FALSE

Value

A list of two elements: the magick image and the ucids in the image.


gerbeldo/tidycell documentation built on Aug. 15, 2022, 2:35 p.m.