open-discussion > RE: How to Change the Direction of Overlay's Color?
Aug 2, 2020  11:08 AM | Chris Rorden
RE: How to Change the Direction of Overlay's Color?
Momo-

You will want to load your statistical overlay twice. Use one layer to optimize your preferences for positive values, the other to optimize your preferences for negative values.
  See the Scripting/Templates/Basic example to show you how to handle this. 

1.) Open a background image (e.g. File/OpenStandard/spm152).
2.) Open your overlay (File/AddOverlay)
3.) In the "Overlay" panel, select the positive value threshold (e.g. for the example we set both Darkest and Brightest to +4. This hides values darker than 4 and clamps values greater than 4 to 4. You could also set this to a positive range (+4..+6).
4.) Open another copy of your overlay (File/AddOverlay)
5.) In the "Overlay" panel, select the negative value threshold (e.g. for the example we set both Darkest and Brightest to -4. This hides values brighter than -4 and clamps values less than -4 to -4. You could also set this to a negative range (-4..-6).




import gl
gl.resetdefaults()
#open background image
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('spmMotor')
gl.minmax(1, 4, 4)
gl.opacity(1,50)
#open overlay: show negative regions
gl.overlayload('spmMotor')
gl.minmax(2, -4, -4)
gl.colorname (2,"3blue")

Threaded View

TitleAuthorDate
Momo Li Aug 2, 2020
Momo Li Aug 2, 2020
Momo Li Aug 2, 2020
Chris Rorden Aug 2, 2020
RE: How to Change the Direction of Overlay's Color?
Chris Rorden Aug 2, 2020