coreHist {coreCT} | R Documentation |
Whole-core frequency distribution of Hounsfield units
Description
Provides the raw data and plots a frequency distibution for Hounsfield Units in the entire core, also delineating material classes. As of coreCT version 1.3.0, this code 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.
Usage
coreHist(directory = file.choose(),
units = "percent",
upperLim = 3045, lowerLim = -1025,
means = c(-850.3233, 63.912, 271.7827, 1345.0696),
sds = c(77.6953, 14.1728, 39.2814, 45.4129),
densities = c(0.0012, 1, 1.23, 2.2),
returnData = TRUE, pngName = NULL)
Arguments
directory |
a character string that can be (1) a matrix of DICOM images that exists in the global environment, or (2) 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. |
units |
units to be used for plotting purposes: either "percent" (the default) or "absolute" |
upperLim |
upper bound cutoff for pixels (Hounsfield Units); upper bound is inclusive |
lowerLim |
lower bound cutoff for pixels (Hounsfield Units); lower bound is exclusive |
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 |
returnData |
if |
pngName |
if this is not |
Value
list if returnData = TRUE
, a list is returned containing (1) the frequencies for each Hounsfield unit value from lowerLim
to upperLim
, (2) the boundaries for material classes, and (3) a summary of the calibration curve applied. Lower boundaries for a component class are exclusive, while upper bounds are inclusive. These materials allow the frequency distribution to be plotted by the user. If returnData = FALSE
the data are plotted in the graphics window, but nothing is preserved.
Examples
# data(core_426)
coreHist("core_426", returnData = FALSE)