Revise

Anatomy of a digital image

Common themes for multiple imaging modalities Free lesson Lesson 10 of 90

Pixels, voxels, matrix vs field of view, bit depth and dynamic range, window width/level, greyscale vs colour, multimodal fusion overlays

0:00 / 0:00

Do you like iRad Shots?

Tap a star

INDEX

The shot

In one line

A digital image is a grid of numbers. The display turns each number into a shade of grey, and windowing chooses which numbers get which shades.

Know this
  • The image is a matrix of pixels, each holding one number. In cross-sectional imaging a pixel stands for a voxel, its area times the slice thickness, and holds the average over that volume.
  • Pixel size equals the field of view divided by the matrix size. A larger matrix or a smaller field gives smaller pixels.
  • Bit depth is the number of bits stored for each pixel. With n bits there are 2 to the power n values: 8 bits give 256, and 12 bits give 4096.
  • Dynamic range is the span of signal, from the weakest to the strongest, that is recorded. Bit depth sets how finely that span is divided, not how wide it is.
  • A monitor shows far fewer shades than a 12-bit image holds. The window width is the range of values spread from black to white, and the level is the value shown as mid-grey.
  • Values below the window are black and values above it are white. A narrow window raises the displayed contrast, and lowering the level brightens the image.
  • Windowing changes only the display. The stored numbers, the noise in them, the resolution and the dose all stay the same.
  • Colour is a look-up table applied to the same numbers. A fused image lays a colour PET image over a greyscale CT, after the two have been registered.
Numbers
  • Grey levels = 2 to the power of the bit depth: 1 bit gives 2, 10 bits 1024, 16 bits 65,536.
  • Typical matrices: CT 512 × 512, MRI 256 × 256, nuclear medicine 64 × 64 to 256 × 256.
  • A 256 mm field on a 512 matrix gives pixels of 0.5 mm.
Exam traps
  • Lowering the window level makes the image brighter, not darker.
  • A larger matrix gives smaller pixels only if the field of view stays the same.
  • One more bit doubles the number of grey levels; it does not add one.

Sketch

Hand-drawn sketch: Anatomy of a digital image

Check yourself

As in the exam: mark each item true or false. Any number can be true.

1. Concerning pixels and voxels:

  1. aAn isotropic voxel has the same size in all three directions.
  2. bEach pixel in a digital image holds a single number.
  3. cIn CT, a voxel's volume depends on the slice thickness.
  4. dA pixel's value shows the tissue at the centre of its voxel only.
  5. eA 512 × 512 matrix holds twice as many pixels as a 256 × 256 matrix.

2. Regarding matrix size and field of view:

  1. aPixel size equals the field of view divided by the matrix size.
  2. bIncreasing the matrix always reduces the pixel size.
  3. cHalving the field of view with the same matrix halves the pixel size.
  4. dA typical CT matrix is 512 × 512.
  5. eSmaller pixels always show finer detail.

3. Concerning bit depth and dynamic range:

  1. aIncreasing the bit depth widens the dynamic range of the detector.
  2. bAn 8-bit image can hold 256 different values.
  3. cAdding one bit to the bit depth doubles the number of possible values.
  4. dA 12-bit image can hold 12 times as many grey levels as a 1-bit image.
  5. eDigital radiography detectors have a wider dynamic range than film.

4. Regarding window width and window level:

  1. aThe window level is the lowest value displayed.
  2. bA window width of one gives a pure black and white image.
  3. cLowering the window level makes the image darker.
  4. dPixel values above the level plus half the width are shown white.
  5. eNarrowing the window increases the displayed contrast.

5. Concerning windowing, colour and fused images:

  1. aFusing a PET image with CT improves the spatial resolution of the PET image.
  2. bNarrowing the window reduces image noise.
  3. cA colour scale adds information that a greyscale image lacks.
  4. dImages must be registered before they are fused.
  5. eWindowing does not change the stored pixel values.

More questions in the question bank
The full explanation about 5 min to read

Pixels and the matrix

A digital image is a rectangular grid of numbers, the matrix. Each element is a pixel, a picture element, holding a single number. What the number means depends on the modality: attenuation in CT, tissue signal in MRI, the X-rays reaching one part of the detector in a radiograph, or gamma-ray counts in nuclear medicine. The picture appears only when the display turns each number into a brightness.

Typical matrices are 512 × 512 in CT, 256 × 256 in MRI (128 to 512 are used), 64 × 64 to 256 × 256 in nuclear medicine, and around 3000 × 3000 for a chest radiograph on a flat panel. Storage is the number of pixels times the bits in each: a 512 × 512 CT slice at 2 bytes a pixel takes half a megabyte. Doubling the matrix in both directions gives four times the pixels and four times the storage.

Voxels

CT and MRI images come from a slice of tissue with a thickness, so each pixel stands for a block of tissue, a voxel or volume element: the pixel's width times its height times the slice thickness. The pixel's number is the average of whatever lies in that block. A voxel holding two tissues takes a value between them, the partial volume effect, worst with thick slices (L53 returns to it). A voxel with the same size in all three directions is isotropic, and allows reformatting in any plane without loss (L13).

Matrix, field of view and pixel size

Pixel size is the field of view divided by the matrix size: a 256 mm field on a 512 matrix gives 0.5 mm pixels, and on a 256 matrix 1 mm. So pixels shrink with a larger matrix for the same field, or a smaller field for the same matrix. A larger matrix does not shrink them if the field grows with it.

Smaller pixels show finer detail only if the rest of the system resolves it: the focal spot, the detector or the reconstruction may be the real limit. They also gather less signal each, so in CT and MRI they are noisier unless more dose or time is spent. Noise and resolution are in L11 and L12, and the two pixels needed for each line pair in L13.

Bit depth and grey levels

Each number is stored in binary, and the number of bits is the bit depth. With n bits, 2 to the power n values are possible: 1 bit gives 2, 8 bits 256, 10 bits 1024, 12 bits 4096, 14 bits 16,384 and 16 bits 65,536. Each extra bit doubles the levels. CT data are usually 12 bits, values 0 to 4095; radiographs and mammograms use 12 to 14 bits. Too few bits give visible steps, false contours, where the change should be smooth.

Dynamic range

Dynamic range is the span of signal, from the weakest to the strongest, that a detector or image records usefully, often given as their ratio. Digital radiography detectors respond in proportion over about four orders of magnitude, ten thousand to one, far wider than film. The dynamic range says how wide the span is; the bit depth says into how many steps it is divided. A wide range coded with too few bits gives coarse steps.

Windowing

A 12-bit image holds 4096 values, but a standard monitor shows 256 grey levels and many diagnostic monitors 1024, and the eye separates fewer still. Windowing chooses which values are spread over the grey scale. The window width is the range of values shown from black to white; the window level, or centre, is the value shown as mid-grey. Values at or below the level minus half the width are black, those at or above the level plus half the width are white, and those between get greys in proportion. The histogram, how many pixels have each value, shows where the tissues lie, and the window is placed over the part of interest.

A narrow window spreads a small range of values over all the greys, so small differences become visible: high displayed contrast. A wide window shows a large range at low contrast. A width of one gives pure black and white, a threshold. Lowering the level slides the window to lower values, so more pixels lie above it and the image becomes brighter; raising it makes the image darker. CT windows are in L53.

What windowing does not change

Windowing is a look-up table between stored values and screen brightness. The stored numbers, their noise, the contrast-to-noise ratio, the spatial resolution and the dose are unchanged. A narrow window makes noise more visible along with the contrast, but does not increase it, and no window can show what was never recorded.

Greyscale and colour

Most radiological images have one number per pixel and are shown in grey. A colour display builds each pixel from red, green and blue, usually 8 bits each, over 16 million colours. Colour in a medical image is usually a pseudo-colour look-up table applied to the same single number: hot-iron scales in PET, perfusion maps, red and blue for flow direction in Doppler. It adds no information, and a colour scale can create apparent edges where values change smoothly, so the scale should always be shown.

Fused images

A fused image lays a functional image, such as PET or SPECT, in colour over an anatomical one, CT or MRI, in grey. The two must first be registered, aligned so that the same point in the patient falls on the same pixel (L13). Hybrid scanners such as PET-CT scan on one couch in one visit, so registration is largely automatic, but breathing or movement between the scans still shifts one against the other. The functional image keeps its coarse resolution of several millimetres; the CT adds anatomy, not sharpness. Display hardware and DICOM are in L15.

Exam traps

Lowering the window level brightens the image; raising it darkens it. A larger matrix gives smaller pixels only for the same field of view. Each extra bit doubles the grey levels. Windowing and colour change the display, never the data: not the noise, the resolution or the dose.