Image normalization in medical imaging puts pixel (or voxel) intensities on a common scale so a model learns anatomy, not scanner brand. GE vs Siemens vs Philips, echo time, auto-window — none of that should become a feature.
If you meant the whole preprocess pipeline (geometric / photometric / denoise), that is what is image preprocessing. If you meant HU windowing, that is CT scan window settings and what is Hounsfield units.
Why the intensity scale matters
Two MRIs of the same brain, two rooms, two vendors, are not the same array. Lighting in a photograph, contrast on a workstation, and scanner calibration all shift the numbers without moving the anatomy. A net trained on Hospital A’s brightness will treat Hospital B’s darker protocol as a different class.
Normalization does not change what is in the image. It recalibrates how the values are written so every volume speaks one numeric language. That is this page. Resize, denoise, and augment are the pipeline page. Clipping a CT to a lung or bone window is the HU pages.
| Problem | What normalisation does |
|---|---|
| Varying illumination / protocol | Same anatomy lands in the same numeric band |
| Inconsistent contrast | Subtle tissue is not stuck in one histogram bin |
| Different sensor calibration | Vendor fingerprint is less of a shortcut the net can learn |
| Slow training | 0–1 or mean-0 / sd-1 is the range most nets expect |
Four methods
| Technique | What it does | Range | Use when | Watch |
|---|---|---|---|---|
| Min-max | Stretch every voxel into a fixed band: (x − min) / (max − min) | Usually [0, 1] | The net wants bounded input. Clean volumes, few artefacts | One hot / dark voxel becomes the new max and compresses tissue |
| Z-score | Subtract mean, divide by standard deviation | Mean 0, sd 1. Unbounded | Default for medical volumes. Roughly bell-shaped intensities | A huge lesion can still move the mean. Then use a robust centre (percentile / White-Stripe) |
| Histogram equalization | Spread frequent intensities so contrast opens up | Full display range | A washed-out film you need to look at | Amplifies noise. Rarely the train-time normaliser |
| White-Stripe | Normalise to a stripe of normal-looking white matter, not the whole brain | Set by that landmark | Brain MRI with lesions (MS and similar) that would wreck a global z-score | Needs a reliable white-matter peak. Not a CT method |
Z-score is the default. Min-max when the architecture is strict about 0–1 and you have already clipped percentiles. Hist-eq is a display tool more than a train-time scale. White-Stripe is the named brain-MRI exception.
A real snippet
Numpy on the array, then one SimpleITK line for the same idea on an image object. Percentile clip first so a metal artefact is not the new max.
import numpy as np
import SimpleITK as sitk
img = sitk.ReadImage("scan.nii.gz")
vol = sitk.GetArrayFromImage(img).astype(np.float32)
# percentile clip so one artefact is not the max
lo, hi = np.percentile(vol, (1, 99))
vol = np.clip(vol, lo, hi)
# min-max → [0, 1]
mm = (vol - vol.min()) / (vol.max() - vol.min() + 1e-8)
# z-score → mean 0, sd 1
z = (vol - vol.mean()) / (vol.std() + 1e-8)
# same idea on the SimpleITK image (after a percentile clamp)
clamped = sitk.Clamp(img, lowerBound=float(lo), upperBound=float(hi))
scaled = sitk.RescaleIntensity(clamped, 0.0, 1.0)
Optional, not a second article: MRI bias-field is sitk.N4BiasFieldCorrection(img). A display window (not a train-time scale) is sitk.IntensityWindowing(img, windowMinimum=-160, windowMaximum=240) — that is HU windowing, and it lives on the CT window page.
FAQ
Do I have to normalise?
For almost any multi-scanner medical set, yes. Skip it and the net learns Hospital A’s brightness. The exception is a single machine, one protocol, locked settings — which is not how a clinic dataset actually arrives.
Will it erase the lesion?
A scale does not delete anatomy. It rewrites the numbers. A bad scale (min-max with a metal max, hist-eq that lifts noise) can hide a faint edge. That is a method choice, not a reason to skip the step.
Which method?
Z-score first. Min-max if the net wants 0–1 and you clipped percentiles. White-Stripe on lesioned brain MRI. Hist-eq to look, not to train — unless you have measured that it helps that net.
PYCAD builds the imaging side of this when the normalised volume has to live in a clinic app. Case studies.
Keep Reading
Related Articles
Explore the full Segmentation HubAll services, tools, and guides on this topic — in one place.
Visit Hub →