read_tiff_masks: Read cell masks from BF.out

View source: R/get_cell_mask_data.R

read_tiff_masksR Documentation

Read cell masks from BF.out

Description

Read boundary and interior pixel data from a BF.out TIFF image.

Usage

read_tiff_masks(
  path,
  cell_id_offset = -1,
  interior_offset = NULL,
  blank_bg = NULL
)

Arguments

path

A string. The path to the 16-bit BF.out tiff file to read.

cell_id_offset

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

interior_offset

logical. If TRUE the function expects that cell masks have interior pixels offset from boundary pixels.

blank_bg

logical. If TRUE the function assumes that the image background (i.e., non-mask pixels) are blank. Set to FALSE if left NULL (the default).

Details

This function reads cell masks from 16-bit BF.out images onto which boundary and interior pixels have been encoded as intensity values proportional to each object's cellID.

By default the function accounts for the possibility that the image may have a brightfield image background and/or interior pixel intensities offset from boundary pixels. It then first identifies the boundary pixel range, then checks if the image also has offset interior pixels, and finally extracts boundary and interior pixels separately. This behavior can be overridden by explicitly specifying the image type via the blank_bg and interior_offset parameters. This may speed up running time.

Value

A data frame of mask pixels ordered by cellID.


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