Windowing a CT Slice
A CT slice stores about four thousand distinct values per voxel — twelve bits of Hounsfield units, running from roughly minus one thousand for air to well past a thousand for dense bone. A monitor shows two hundred and fifty six shades of grey, and an eye reliably separates rather fewer than that. Something has to be thrown away. Windowing is the decision about what.
The rule is a straight ramp with two numbers. Level is where the ramp sits, width is how wide it is. Everything below the ramp becomes flat black, everything above becomes flat white, and the whole grey range is spent on what falls inside.
That sounds destructive until you look at where the values actually live. Air sits near minus one thousand, fat around minus a hundred, water at zero by definition, soft tissue in a tight band just above it, bone far off to the right. The interesting organs occupy a couple of hundred units in the middle of a four thousand unit range.
So a soft-tissue window is not a compromise. It is the correct allocation for the question being asked. A bone window is the correct allocation for a different question, and it is the same stored voxels rendered again — nothing is reloaded, nothing is recomputed, nothing about the file changed.
This is why a viewer keeps the original sixteen-bit data in the texture and applies the window in a shader. Changing the window becomes two uniforms and a redraw, which is why dragging with the right mouse button feels instant while loading the series did not.
It is also why a screenshot of a scan is a quote rather than the source. It carries one window, chosen by whoever took it, with everything outside it already gone.
