append_hues2: Add Hu moments data.frame to a cell_data object

append_hues2R Documentation

Add Hu moments data.frame to a cell_data object

Description

The required TSV are generated by the mask_mod branch of the CellID program found at: https://github.com/darksideoftheshmoo/cellID-linux/tree/mask_mod

Usage

append_hues2(
  tsv_files_df,
  cell_data = NULL,
  return_points = F,
  parralellize = T,
  shape_pixtype = "b",
  shape_flagtype = 0,
  overwrite = F
)

Arguments

tsv_files_df

A data.frame with paths to the TSV files with the cells' XY coordinates, generated by CellID mask_mod's "-t" option. Use tsv_paths_from_args() for convenience.

cell_data

NULL list by default. You may pass a cell.data list object from rcell2::load_cell_data, for convenience, or just the cdata dataframe as list(data = cdata).

return_points

if TRUE it will add a "masks" dataframe to the cell_data object, containing the mask coordinates.

parralellize

Enable cell-wise parallelization using parallel::parLapply

shape_pixtype

Default "b" for Hu moments based on boundary points. A character vector containing any of c("b", "i").

shape_flagtype

Default 0 for Hu moments based on flag value 0. Can be any of the integer flag values present in the out_bf_fl_mapping CellID files.

overwrite

Default FALSE, overwrite Hu moments element in the input list if already present.

Details

To play with the XY coordinates of the TIFF masks you may want to set return_points = T.

Value

The Hu moments dataframe usis assgned to the input list as an element named "Hu_moments".


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