coreHist: Whole-core frequency distribution of Hounsfield units

Description Usage Arguments Value Examples

View source: R/coreHist.R

Description

Provides the raw data and plots a frequency distibution for Hounsfield Units in the entire core, also delineating material classes.

Usage

1
2
3
4
5
6
7
8
coreHist(directory = file.choose(), 
units = "percent",
upperLim = 3045, lowerLim = -1025,
airHU = -850.3233, airSD = 77.6953,
SiHU = 271.7827, SiSD = 39.2814,
glassHU = 1345.0696, glassSD = 45.4129,
waterHU = 63.912, waterSD = 14.1728,
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

airHU

mean value for air-filled calibration rod (Hounsfield Units)

airSD

standard deviation for air-filled calibration rod

SiHU

mean value for colloidal silica calibration rod

SiSD

standard deviation for colloidal Si calibration rod

glassHU

mean value for glass calibration rod

glassSD

standard deviation for glass calibration rod

waterHU

mean value for water filled calibration rod

waterSD

standard deviation for water filled calibration rod

returnData

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.

pngName

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.

Value

list if returnData = TRUE, a list is returned containing the frequencies for each Hounsfield unit value from lowerLim to upperLim, and (2) the boundaries for material classes. 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

1
2
# data(core_426)
coreHist("core_426", returnData = FALSE)

coreCT documentation built on June 25, 2018, 1:06 a.m.