Calibrations

Calibrations Background

Grayscale images are represented as a (2D or 3D) grid of numerical values. These values are referred to as the raw or native pixel (or voxel) values. Each pixel value is stored using a data type of signed or unsigned integer or floating-point number using 8, 16 or 32 bits. Depending on which data type is used, the value range may be limited to a different range:

  • uint8: 0 … 255

  • int8: -128 … 127

  • uint16: 0 … 65535

  • int16: -32768 … 32767

  • uint32: 0 … 4294967295

  • int32: -2147483648 … 2147483647

  • float32: Approximately -3.4e38 … 3.4e38 with 6 to 9 significant decimal digits precision.

The raw values are sometimes created using a scaling chosen such that it preserves more of the dynamic range. So the raw pixel values often do not directly provide meaningful physical quantities. To convert the raw values into physical units (such as intensity, density, …) a mapping function is required. Often a linear scaling (and intercept) are used to map raw values to a desired range of physical units. For example, if the raw pixel values range from 0 to 255 and the desired physical units are in the range of 0 to 1, a linear mapping can be used to scale the values accordingly.

Calibrations in microCT Bone Research

In microCT imaging, raw pixel values are used to represent the attenuation of X-rays as they pass through the sample. To quantify bone mineral density (BMD), a calibration is typically used to map raw pixel values to BMD values. This calibration is created by scanning phantoms with known BMD values and fitting a mapping to the relationship between raw pixel values and the known BMD values.

Phantoms are objects with known properties that are scanned under the same conditions as the bone samples. They serve as reference points for establishing a relationship between image intensity and BMD. Accurate calibration is crucial for obtaining reliable and comparable results in bone research. Without calibration, it is impossible to accurately quantify bone mineral density or other bone properties from microCT images. Calibration ensures that the results obtained from different studies are comparable and can be used to draw meaningful conclusions about bone health and disease.

Calibrations and OMNI Metadata

In XamFlow many task types work with the OMNI file format, which can contain calibration information in the OMNI metadata. The task types that use calibration information typically use an input parameter to select the preferred calibration type to use.

There are some general calibration-related task types for this:

  • Lucid.Util.AssignImageCalibration to assign calibration metadata from a calibrated phantom image to other images.

  • Example.Basic.OverrideDefaultCalibration to override the default calibration in the OMNI metadata.

Calibrations and Scanco IPL

XamFlow can work with the Scanco IPL software, which requires the use of the AIM image file format. AIM files can also contain calibration information in the AIM file processing log. XamFlow can convert between OMNI files and AIM files transparently or explicitly.

When using XamFlow (and Scanco IPL) with Scanco images this usually works automatically.

Calibrations and Skyscan images

When using XamFlow with Skyscan images, Skyscan.Util.CalculateImageCalibration can be used to apply calibration information from typical Skyscan phantom scans. See also Workflow.Calibration.SkyScan for an example workflow. The dens (density) calibration type is used in the OMNI metadata for this.

Skyscan.Util.ReadDynamicRangeFromNReconLog can be used to read the dynamic range information from the NRecon .log file. This can be useful even without phantom scans, for example when using the same threshold value across images with different dynamic range. The linatt (linear attenuation) calibration type is used in the OMNI metadata for this.

In XamFlow Skyscan images can be used with the Scanco IPL software if available. Both the phantom scan (dens) and the dynamic range (linatt) OMNI metadata are required to convert image files to the AIM format for use with IPL.

Calibrations and PerkinElmer images

When using XamFlow with PerkinElmer images, PerkinElmer.Util.CalculateImageCalibration can be used to apply calibration information from typical PerkinElmer phantom scans. See also Workflow.Calibration.PerkinElmer for an example workflow. The dens (density) and hu (Hounsfield Unit) calibration types are used in the OMNI metadata for this.

Calibrations and other images

Any scanning device that provides quantitative pixel values can be calibrated with a suitable phantom, or can provide known mapping information. Task types like Lucid.Util.AssignImageCalibration and custom scripts can easily be used to assign this information to images to be processed in XamFlow.