extr_Original - veeninglab/BactMAP GitHub Wiki

Convert original TIFF image stack used to gather spot and cell outline data.

Description

extr_OriginalStack() converts the original TIFF stack used to gather spot and cell outline data to a data frame containing the pixel x,y coordinates and the pixel value.

extr_OriginalCells() is connecting the TIFF data to mesh outlines and returning a data frame containing pixel values inside each cell. This data frame can be used to produce kymographs (using bactKymo()) or to make cell towers & movies (using plotCellsTime()).

Usage

extr_OriginalStack(picloc)

extr_OriginalCells(imdatframe, mesh)

Arguments

extr_OriginalStack

  • picloc: file path of the .TIFF image stack.

extr_OriginalCells:

  • imdatframe output dataframe of extr_OriginalStack()

  • mesh dataframe containing (at least) mesh coordinates, cell numbers and frame numbers.

Details

  • extr_OriginalStack needs the package “raster” to function.

  • extr_OriginalCells needs “SMDTools” and “raster” to function

Note

  1. extr_OriginalCells is a heavy function since it’s turning all pixels of each cell!

  2. extr_OriginalStack works for single TIFFs and stacks. It only works with greyscale stacks.

Examples

#get tif - find examples in tutorial section
TIFFfilepath <- file.choose()

TIFFstack <- extr_OriginalStack(TIFFfilepath)

#plot stack
bactMAP::plotRaw(TIFFstack, frameN=1)

#get cell meshes
Meshpath <- file.choose()
meshes <- extr_Oufti(Meshpath)

#combine cells & tiff
extr_OriginalCells(TIFFstack, meshes$mesh)