View source: R/calibrateFilm.R
| fitCalibrationModel | R Documentation |
Fit a model to calibrate a film from X-ray densitometry.
fitCalibrationModel( grayvalues, thickness = stepIncrease(0.24, 7), density = 1.2922, plot = TRUE, ... )
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 |
an object of class 'loess' representing the film calibration
getSteps
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
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.