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.
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)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 to be used for plotting purposes: either "percent" (the default) or "absolute"
upper bound cutoff for pixels (Hounsfield Units); upper bound is inclusive
lower bound cutoff for pixels (Hounsfield Units); lower bound is exclusive
mean values (units = Hounsfield Units) for calibration rods used.
standard deviations (units = Hounsfield Units) for calibration rods used. Must be in the same order as means.
numeric vector of known cal rod densities. Must be in the same order as means and sds.
if TRUE, voxel counts for each Hounsfield unit from lowerLim to upperLim are returned, as are material class definitions. These are the data needed to re-create and modify the frequency plot.
if this is not NULL, the frequency plot is saved to disk. In that case, pngName should be a character string containing the name and address of the file.
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.
# NOT RUN {
# data(core_426)
coreHist("core_426", returnData = FALSE)
# }
Run the code above in your browser using DataLab