extr_Original | R Documentation |
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 cell outlines to pixel values, using the output of extr_OriginalStack()
and a mesh
dataframe.
extr_OriginalStack(picloc)
extr_OriginalCells(imdatframe, mesh, surroundings=FALSE, turnCell=TRUE)
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. |
surroundings |
when TRUE, the function takes a box around the cells, when FALSE, only the pixels inside the cells are taken. |
turnCell |
when TRUE, the cells all turned in the same orientation. when FALSE, this is not the case. |
extr_OriginalStack needs the package "raster" to function.
extr_OriginalCells needs "SMDTools" and "raster" to function
The output of extr_OriginalStack is a list of dataframes including the x coordinates, y coordinates and intensity values of each pixel.
The output of extr_OriginalCells is a list of dataframes including:
rawdata_turned |
a dataframe including the cell information and pixel coordinates per cell, all turned in the same direction. |
mesh |
mesh data turned in the same direction |
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, not hyperstacks. It only works with greyscale stacks.
Renske van Raaphorst
## Not run:
#get tif
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.