rootSizeDir {coreCT} | R Documentation |
Convert a directory of raw DICOM images to root particle counts and surface areas
Description
Calculates the number of root/rhizome particles and surface areas, for different size classes. This approach directly replicates Earl Davey's manual classification approach. This method is deprecated as of coreCT version 1.3.0.
Usage
rootSizeDir(directory = file.choose(), diameter.classes = c(1, 2, 5, 10, 20),
class.names = diameter.classes,
airHU = -850.3233,
airSD = 77.6953,
waterHU = 63.912,
waterSD = 14.1728,
pixel.minimum = 1)
Arguments
directory |
a character string that can be a matrix of DICOM images or the address of an individual DICOM file in a folder of DICOM images. The default action is <code>file.choose()</code>; a browser menu appears so the user can select the the desired directory by identifying a single DICOM file in the folder of images. |
diameter.classes |
an integer vector of diameter cut points. Units are mm (zero is added in automatically). |
class.names |
not used presently |
airHU |
mean value for air-filled calibration rod (all rod arguments are in Hounsfield Units) |
airSD |
standard deviation for air-filled calibration rod |
waterHU |
mean value for water-filled calibration rod |
waterSD |
standard deviation for water-filled calibration rod |
pixel.minimum |
minimum number of pixels needed for a clump to be identified as a root |
Details
Calculates the number of root/rhizome particles and surface areas, for different size classes. Unlike rootSize
, rootSizeDir
accepts a folder of raw values and makes the conversion to Hounsfield Units using the metadata associated with the DICOM images.
Value
value rootSize
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
.
See Also
rootSizeDir
is a wrapper for rootSize
. rootSizeDir
operates similarly.
Examples
rootChars <- rootSizeDir("core_426", 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)