In the Phong lighting calculation for C_i, the diffuse colour, k_d, can be set to a constant, or can be set based on the \tau_i value.
A transfer function is a mapping from \tau values to k_d and \tau' values.
The transfer function is usually supplied to the fragment shader as a 1D texture, f, which returns a four-tuple: (r,g,b,\tau') = f( \tau )
The (r,g,b) values can be set to provide different colours to areas of different radiological densities, such as white for bone and red for soft tissue.
The \tau' value can be used the replace the original \tau in the computation of \alpha: \alpha = \tau'\ \Delta s
This is usually done to make some areas of the volume transparent (by setting \tau' to zero) and other areas of the volume opaque (by setting \tau' to one).
The examples below show three transfer functions (on the left) and their corresponding volume renderings (on the right).
The horizontal axis of the transfer function on the left is the original \tau from the volume. The vertical axis is (r,g,b,\tau'), where the red, green, blue, and black curves show the three colours and the new \tau'. (The first and second examples have red, green, and blue superimposed, so only blue is visible.) The brown peaks are the histogram of \tau values.
The first transfer function sets k_d to (1,1,1), or white, and sets \tau' = \tau, or unchanged. Note that surfaces appear grey in the rendering below because the white backlight and surface colour are being absorbed on the way to the eye.
The second transfer function sets \tau' to zero for low \tau values. This has the effect of removing (by making transparent) the air and cloth surrounding the subject.
The third transfer function sets \tau' (the black line below) to zero, then sets it to a slowly increasing low value, then sets it to a very high value. This has the effect of making soft tissue transparent, but still visible, and of making bone opaque.
To the left of the blue, green, and black vertical lines below, k_d is set to red, because the red curve is one and the green and blue curves are zero in that range of \tau values. So soft tissue appears red.
To the right of those vertical lines, k_d is set to white, so bone appears white.
You can see the red soft tissue overlaying the bone underneath.