View source: R/equalize.stack.R
equalize.stack | R Documentation |
Conducts histogram equalization to adjust the contrast of the image stack. May improve visibility of muscle fibers prior to fiber detection. Optionally automatically save new image stack in working directory.
equalize.stack(images, n, save.images = FALSE)
images |
A vector of png image file names, created using list.files |
n |
The number of the image in the stack to be equalized and plotted |
save.images |
Should the whole image stack be equalized and plotted? |
Creates a plot and optionally saves an image stack
J. Arbour
Arbour, J. In Prep. GoodFibes: an R package for the detection of muscle fibers from diceCT scans
crop.stack
olddir<-getwd()
#### this downloads the ant dataset image stack
#### if you have it already downloaded you can navigate to that folder
setwd(tempdir())
download.file(url=
"https://github.com/jessica-arbour/Ant-Muscle-Image-Stack/raw/main/Ant_data.zip",
destfile="antdata.zip")
unzip("antdata.zip")
setwd(paste0(getwd(),"/Ant data"))
####
images<-list.files(pattern=".png")
equalize.stack(images, 100)
setwd(olddir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.