muscle.plot {GoodFibes} | R Documentation |
Plot a single muscle fiber
Description
Used to compare the muscle fiber path to the smoothed muscle fiber. Plots a single set of $fiber.points from and the smoothed fibers.
Usage
muscle.plot(fiber.dat, images, df = 4, mirror.axis = FALSE, outline = 50, size = 2)
Arguments
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 |
Value
Returns a 3D plot
Author(s)
J. Arbour
References
Arbour, J. In Prep. GoodFibes: an R package for the detection of muscle fibers from diceCT scans.
See Also
muscle.plot.multi
, muscle.plot.stl
Examples
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)