So the window is the difference between the two HU values (upper - lower).
And the window centre in HU is (upper+lower)/2.
It might be better to have a dictionary of HOUNSFIELD_UPPER_LOWER_BOUNDS so the physics is clear regarding what is going on, and then calculate (in to a constant dictionary) for CUSTOM_PRESETS from that.
Originally posted by @sjswerdloff in #405 (comment)