Description Usage Arguments Value Examples
Read virtual template (in jpeg) into R. The spatially located regions must be coloured differently, and no borders should be used.
1 2 3 4 5 6 7 8 | readTemplate(
pathToImage,
k,
bgThr = 0.93,
neighbours = c(20, 5),
refineRound = 2,
plot = TRUE
)
|
pathToImage |
Path to the jpeg or png image. The number of virtual cells will be determined by the size of the picture. |
k |
Number of spatial domains in the image |
bgThr |
Threshold (between 0 and 1) above which all the color channels (RGB) have to be above for the pixel to be considered background. Default:0.93 |
neighbours |
Number of neighbours to be used to refine color cluster assignment. It must be the same length as the number of refinement rounds. Default: c(20, 5). |
refineRound |
Number of cluster refinement rounds. Default:2 |
plot |
Boolean indicating whether to return the computed template colored by spatial sections. Default: TRUE. |
A virtual map data.frame containing the virtual cell coordinates, assigned spatial cluster (original and refined), and cluster color
1 | virtualTemplate <- readTemplate(pathToJpeg, k=8, bgThr=0.93, neighbours=c(20,5), refineRound=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.