ogo.calibration.calibration module

Abstract class for calibration

class ogo.calibration.calibration.Calibration

Bases: abc.ABC

Abstract base class for calibration.

Classes that overwrite this method should implement the methods:
  • _fit()
  • _predict()
  • _predict_inverse()

The logic around fitting and then predicting is handled by the base class.

In general, we seek a mapping from Hounsfield Units to units of density.

\[\phi: HU \rightarrow \rho\]

Typically, these densities are in a mass-equivalent (such as \(K_2HPO_4\) or hydroxyapatite).

fit(hounsfield_units, densities)

Given an array of Hounsfield Units and an array of densities, determine the best fit

predict(hu)

Having fit the calibration, predict the density from the Hounsfield Units in a VOI

predict_inverse(density)

Having fit the calibration, predict the Hounsfield Units from the density in a VOI