muscle.plot.stl {GoodFibes} | R Documentation |
Plot and export muscle fibers to stl
Description
Plot a series of muscle fibers produced by good.fibes. Fibers are smoothed using splines before plotting. Optionally export an STL file in the correct size scale.
Usage
muscle.plot.stl(fiber.list, res = 1, df = 2, radius = 1, cols = NULL,
save.plot = FALSE, file.name = "muscle.fibers.stl", mirror.axis = FALSE)
Arguments
fiber.list |
A list of fibers with $fiber points. Generated by good.fibes or processed cleaned by other functions |
res |
The isometric resolution of the original scan (i.e., the distance between images). Provided as a linear measure (um, mm, etc.) |
df |
The degrees of freedom to pass to splines2::nsp for smoothing fiber paths. df = 1 gives a straight path, while >1 gives increasingly curved paths |
radius |
The radius of the lines plotted for muscle fibers |
cols |
An optional vector of colors, the same order and length of fiber.list |
save.plot |
When TRUE, plot is saved as an .stl object in the current working directory. Provide file in file.name argument. |
file.name |
Character data giving the file.name and ending in .stl |
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 |
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
,good.fibes
Examples
data(ant.final)
muscle.plot.stl(ant.final, res = 0.000673107, df=1, radius = 1,
mirror.axis = TRUE, save.plot = FALSE)