向DigitalMicrograph GMS3中的图像添加/应用自定义数据栏 [英] add / apply custom databar to image in DigitalMicrograph GMS3

查看:1030
本文介绍了向DigitalMicrograph GMS3中的图像添加/应用自定义数据栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个图像,希望通过DigitalMicrograph 3.21.1374.0中的脚本将自定义数据栏应用到该图像.我还想应用自定义布局(此处的单独问题:应用自定义在DigitalMicrograph GMS3中的图像布局).

I have an image that I want to apply a custom databar to via a script in DigitalMicrograph 3.21.1374.0. I would also like to apply a custom layout (separate question here: Apply Custom Layout to Image in DigitalMicrograph GMS3).

我目前手动执行的操作是:

The procedure that I currently do by hand is:

  1. 右键单击图像
  2. 将鼠标悬停在布局上(在上下文菜单中)
  3. 左键单击添加数据栏"
  4. 在弹出的对话框中选择自定义数据栏(我想要的一个称为"CheckDataBar")
  5. 单击确定"

这完美无瑕-除了我想运行脚本来执行此操作(这样我才能循环所有打开的图像并应用数据栏).

This works flawlessly - except that I would like to run a script to do it (so I can loop all the open images and apply the databar).

这是我到目前为止仅能制作一张图像的代码:

Here is the code that I have so far to do just one image:

//main - get front image and apply custom databar
image Img := GetFrontImage()
imageDisplay imgDisplay = Img.ImageGetImageDisplay(0)

ApplyDataBar(imgDisplay)//this only adds the scale bar not the custom databar that i would like

我已经尝试过ApplyDataBar(imgDisplay, CheckDataBar),但这不起作用.

I have tried ApplyDataBar(imgDisplay, CheckDataBar) but that does not work.

有什么想法吗?

推荐答案

ApplyDatabar()是早期GMS版本中的旧命令,只会添加比例标记.

ApplyDatabar() is an old command from earlier GMS versions and will only add the scalemarker.

但是,您对其他问题的回答(应用布局)也可以用于应用数据栏,但前提是数据栏是布局的一部分.

However, this answer to your other question ( applying layouts ) can also be used to apply the databar, provided the databar is part of the layout.

因此,您必须创建一个 layout ,其中首先包含自定义数据栏.然后将 layout 应用于 imageDocument 而不是 imageDisplay .

So, you have to create a layout which contains the custom databar first. Then you apply the layout to the imageDocument not the imageDisplay.

这篇关于向DigitalMicrograph GMS3中的图像添加/应用自定义数据栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆