Windowing Transfer Function

266 views Asked by At

I'm implementing a volume renderer and I want to use Windowing Transfer Function to enable the user to change the opacity of some regions. As far as I understood, there are three variables window, offset and scale

The window is how much of my values I want to change the alpha for, the offset is how far my window from the minimum value. But I'm not sure what is the scale ? Is it the increase between one alpha value to the next, or is it the maximum alpha in my current window?

Am I missing anything or getting anything wrong?

This is what I have in mind

This is what I have in mind

2

There are 2 answers

0
Reto Koradi On

"scale" does not sound like a standard term in this context. You'll need to get the exact definition from whoever is providing the parameters to you.

In DICOM, which is mostly used for medical volume datasets, the two directly related tags are:

  • WindowCenter, which is tag (0028,1050). In your diagram, this is the center position of sloped part.
  • WindowWidth, which is tag (0028,1051). In your diagram, that's the total width of the sloped part.

In other words, if alpha is 0 until value Value0, and is 1 starting at Value1:

WindowCenter = (Value0 + Value1) / 2
WindowWidth = Value1 - Value2

Or writing the relationships in the opposite direction:

Value0 = WindowCenter - WindowWidth / 2
Value1 = WindowCenter + WindowWidth / 2

The closest thing to "scale" I have heard as a standard term in this domain are the "RescaleIntercept" and "RescaleSlope" tags. But those define a linear mapping for the data itself, not for the transfer function.

My best guess would be that "window" corresponds to "WindowWidth" in the definition above, and "offset" corresponds to "WindowCenter". But you really need to request clarification from the original source of these parameters. And ask them what they mean by "scale".

0
datenwolf On

Normally the transfer function is a remapping from old alpha to new alpha. As a rule of thumb the range of values going into the transfer function is the same as what's coming out.

So if your original alpha values are in the range [0,1] then the values produced by your function should be in the range [0,1] as well.

(BTW: a window function is something different, you'd multiply it as an inner product on the incoming values)