Bug in ImageInfo ?
bs
String list= ImageNameList("",";")
String imagePlot = StringFromList(0,list, ";")
info=ImageInfo("",imagePlot,0)
print ImageInfo("",imagePlot,0))
There is a space between "plane=" and the variable.
That makes it impossible to adress the plane with:
variable plane=str2num(StringByKey("plane",ImageInfo("",imagePlot,0)))
[Fixed with]
info = replacestring(" ", info, "")
variable plane=str2num(StringByKey("plane",ImageInfo("",imagePlot,0),"= "))
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
December 7, 2015 at 10:44 am - Permalink
// The WMImageInfo procedure file contains functions for retrieving information about image plots.
// Included are WM_GetColorTableMinMax, WM_ColorTableForImage, WM_ColorTableReversed,
// WM_ImageColorTabInfo, WM_ImageColorLookupWave, and WM_ImageColorIndexWave.
Function GetPlane(graphName, imageName)
String graphName, imageName
String infoStr= ImageInfo(graphName, imageName,0)
Variable plane=str2num(WMGetRECREATIONInfoByKey("plane",infoStr))
return plane
End
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
December 8, 2015 at 10:17 am - Permalink