On Apr 20, 2016, at 9:26 AM, Bruno Martins <[email protected]> wrote:
Hi Phil,
You can create two rules, for the data_width and data_height properties, that look at the $(P)ArraySize0_RBV and $(P)ArraySize1_RBV PV's
HTH,
Bruno
On Wed, Apr 20, 2016 at 6:44 AM, Phil Atkin <[email protected]> wrote:
Thanks Gabriela,
- but I guess my question was ambiguous. If I understand correctly, your script adjusts the height of the IntensityGraph widget so that its aspect ratio matches the image.
But the IntensityGraph will not display anything at all unless I set its Data Height and Data Width properties to match the attached array. Do you have something to accomplish this?
Also: I have no idea how to actually attach the code or make it run at an appropriate time. Can you point me at documentation that describes this?
Thanks
Phil
On 20/04/2016 11:34, [email protected] wrote:
this is the very simple python script that I use:
from org.csstudio.opibuilder.scriptUtil import PVUtil
imageWidget = display.getWidget('Image')
imageXSizeWidget = display.getWidget('X-Size')
imageYSizeWidget = display.getWidget('Y-Size')
try :
imageXSizePV = imageXSizeWidget.getPV()
imageYSizePV = imageYSizeWidget.getPV()
nImageRows = PVUtil.getLong(imageYSizePV)
nImageColumns = PVUtil.getLong(imageXSizePV)
imageWidget.setPropertyValue('graph_area_width', 512)
imageWidget.setPropertyValue('graph_area_height', (512.0/nImageColumns)*nImageRows)
except :
pass
Phil Atkin <[email protected]> ha scritto:
Hi,
I'm using BOY IntensityGraph to show a (stdArray) output image from an areaDetector driver/plugin.
The size of my array changes quite a bit.
Can someone tell me (in laborious detail if necessary, please) how to set up scripts or "embedded rules" on the IntensityGraph to cope with a variable-sized image?
Thanks!
Phil