fitCalibrationModel {xRing} | R Documentation |
Fit a Calibration Curve
Description
Fit a model to calibrate a film from X-ray densitometry.
Usage
fitCalibrationModel(
grayvalues,
thickness = stepIncrease(0.24, 7),
density = 1.2922,
plot = TRUE,
...
)
Arguments
grayvalues |
a numeric vector containing the gray values of the steps of the calibration wedge at various thicknesses given by the argument 'thickness' |
thickness |
a vector specifying the thickness of the calibration wedge at each step. |
density |
the density of the reference material |
plot |
if TRUE the calibration model is displayed |
... |
further arguments to be passed to loess |
Value
an object of class 'loess' representing the film calibration
See Also
Examples
if (interactive()) {
# read a sample file
im <- imRead(file = system.file("img", "AFO1046.1200dpi.png", package = "xRing"))
# display the image
imDisplay(im)
# get the grayvalues from the calibration wedge on the film
grayvalues <- getSteps(im, 7)
# calibrate the film by fitting a model:
calibration <- fitCalibrationModel(grayvalues,
thickness = stepIncrease(0.24, 7),
density = 1.2922,
plot = TRUE
)
}
[Package xRing version 0.1.1 Index]