View source: R/load_mask_data.R
read_tiff_masks | R Documentation |
Read boundary and interior pixel data from a BF.out TIFF image.
read_tiff_masks(
path,
cell_id_offset = -1,
interior_offset = NULL,
blank_bg = NULL
)
path |
A string. The path to the 16-bit BF.out tiff file to read. |
cell_id_offset |
integer. The pixel intensity offset with respect to maximum pixel intensity, such
that |
interior_offset |
logical. If |
blank_bg |
logical. If |
This function reads cell masks from 16-bit "BF.out" images produced by Cell-ID, onto which boundary and interior pixels have been encoded as intensity values proportional to each segmented 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.
Limitations: this function only uses information from 16-bit "brightfield"
images output by CellID. The fluoresence channels output images are 8-bit,
and do not contain the necessary information. This might be relevant if the
fluorescent images were aligned to the BF by CellID, such that the pixel
coordinates differ between brightfield and fluorescence output images.
If this is a problem for you, then use cell.load.boundaries
with
data.source = 'masks.tsv'
to read CellID's TSV output files (for
that see cell2
).
See CellID's mask_mod branch for more details: https://github.com/darksideoftheshmoo/cellID-linux/blob/mask_mod/README.md#branch-notes
A data frame of mask pixels ordered by cellID.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.