fitCalibrationModel: Fit a Calibration Curve

Description Usage Arguments Value See Also Examples

Description

Fit a model to calibrate a film from X-ray densitometry.

Usage

1
2
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

getSteps

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)
}

xRing documentation built on May 2, 2019, 5:51 a.m.