append_hues: Add Hu moments from TIFF files to cell.data

append_huesR Documentation

Add Hu moments from TIFF files to cell.data

Description

Generate Hu moments columns from TIFF files and append them to "data" on a cell_data object.

Usage

append_hues(cell_data, image_bits, cell_id_offset = -1, return_points = F)

Arguments

cell_data

a cell_data object as loaded by rcell2::load_cell_data

image_bits

an integer indicating the bit-depth on the TIFF images, such that maximum intensity is image_bits^2 -1 and minimum is zero. Tipically 8 or 16.

cell_id_offset

the offset respect to maximum pixel intensity, such that cellID = maximum_intensity - boundary_intensity + cell_id_offset.

return_points

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

Details

It is imperative that the TIFF images contain only cell boundaries, with pixel intensity values such that CellID = (2^image_bits -1) - pixel_value.

Such TIFF images are automatically generated by the mask_mod branch of the CellID program found at: https://github.com/darksideoftheshmoo/cellID-linux/tree/mask_mod

To play with the XY coordinates of the TIFF masks you may want to set return_points = T. Or if you want to skip calculation of the Hu moments, checkout rcell2:::mask_df_from_tiff.


darksideoftheshmoo/rcell2 documentation built on Oct. 23, 2024, 12:59 p.m.