muscle.plot | R Documentation |
Used to compare the muscle fiber path to the smoothed muscle fiber. Plots a single set of $fiber.points from and the smoothed fibers.
muscle.plot(fiber.dat, images, df = 4, mirror.axis = FALSE, outline = 50, size = 2)
fiber.dat |
Any set of $fiber.points produced by good.fibes |
images |
A character vector with image names representing the image stack, can be produced using list.files. |
df |
The df to be used in smoothing fiber paths in the calculation of fiber length |
mirror.axis |
Depending on the way the image stack was exported, fibers may be reflected from their original original. mirror.axis = TRUE will reflect the fibers before plotting to correct this |
outline |
The number of wireframe "outlines" to draw the muscle boundaries |
size |
point size for $fiber.points in plot |
Returns a 3D plot
J. Arbour
Arbour, J. In Prep. GoodFibes: an R package for the detection of muscle fibers from diceCT scans.
muscle.plot.multi
, muscle.plot.stl
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")
data(ant.final)
muscle.plot(ant.final[[100]]$fiber.points,images,df=1, outline=30, mirror.axis=TRUE)
setwd(olddir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.