dm-script - 如何找出 DM 函数应采用哪些参数?

标签 dm-script

通过反复试验,我发现 GetPixel 函数需要两个参数,一个用于 X,一个用于 Y,即使用于一维图像也是如此。在一维图像上,第二个索引必须设置为零。

image list := [3]: {1,2,3}
list.GetPixel(0,0) // Gets 1
GetPixel(list, 0, 0)    // Equivalent

我怎么知道这一点?我在文档中看不到任何明确说明这一点的内容。

最佳答案

最好的方法是使用带有不正确参数列表的脚本函数,运行脚本并观察错误输出:

enter image description here

关于dm-script - 如何找出 DM 函数应采用哪些参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64499037/

相关文章:

types - 如何解决UiFrame::getConfiguration()的 “No match for =( TagGroup, RealNumber )”错误

dm-script 调整图像显示内容

loops - 能否通过DM脚本获取到前面没有的图片?

dm-script - DM 脚本中的类型转换

memory-leaks - 是否需要删除image变量来回收内存空间

image-processing - 如何通过脚本将多个 ROI 裁剪为 DM 中的图像?

dm-script - 如何在gatan脚本中读取配置文件,例如json或ini

dm-script - 将 XY 校准从 2D 图像复制到 3D 图像