Description Usage Arguments Details Value See Also Examples
Calculates the number of root/rhizome particles, volumes, and surface areas, for different size classes. This version accommodates calibration curves with >4 calibrants, and uses density thresholds converted to Hounsfield Units using the calibration curve (rather than direct calibration rod values) to partition sediment components.
1 2 3 4 5 6 7 |
mat.list |
list of DICOM images for a sediment core (values in Hounsfield Units) |
pixelA |
pixel area (mm2) |
diameter.classes |
an integer vector of diameter cut points. Units are mm (zero is added in automatically). |
class.names |
not used presently |
thickness |
slice thickness for computed tomography image series (mm) |
means |
mean values (units = Hounsfield Units) for calibration rods used. |
sds |
standard deviations (units = Hounsfield Units) for calibration rods used. Must be in the same order as |
densities |
numeric vector of known cal rod densities. Must be in the same order as |
pixel.minimum |
minimum number of pixels needed for a clump to be identified as a root |
Calculates the number of root/rhizome particles, volumes, and surface areas, for different size classes. This function requires that values be Hounsfield Units (i.e., data must be semi-processed from the raw DICOM imagery).
value getRoots
returns a dataframe with one row per CT slice. Values returned are the number, volume (cm3), and surface area (cm2) of particles in each size class with an upper bound defined in diameter.classes
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ct.slope <- unique(extractHeader(core_426$hdr, "RescaleSlope"))
ct.int <- unique(extractHeader(core_426$hdr, "RescaleIntercept"))
# convert raw units to Hounsfield units
HU_426 <- lapply(core_426$img, function(x) x*ct.slope + ct.int)
rootChars <- getRoots(HU_426, pixelA = 0.0596,
diameter.classes = c(2.5, 10))
## Not run:
# plot using "ggplot" package after transforming with "reshape2" package
area.long <- reshape2::melt(rootChars, id.vars = c("depth"),
measure.vars = grep("Area", names(rootChars)))
ggplot2::ggplot(data = area.long, ggplot2::aes(y = -depth, x = value,
color = variable)) + ggplot2::geom_point() + ggplot2::theme_classic() +
ggplot2::xlab("root external surface area per slice (cm2)")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.