dm-script

Is it possible for a DigitalMicrograph script object to be notified of an ROI change on an image?

混江龙づ霸主 提交于 2019-12-02 07:51:03
问题 The DigitalMicrograph scripting documentation alludes to various types of Listener objects that can be used to notify a script object of various types of events. In particular, ImageDisplay objects have explicit support for key listeners so that a script object can be notified when a keystroke event is targeted to a specific image display. Is it possible to receive notification that an ROI on an image has been changed in size or position via a similar mechanism? 回答1: Yes there are. In fact,

Opening multiple files from folder in DigitalMicrograph scripting

大兔子大兔子 提交于 2019-12-02 06:44:09
问题 I am trying to write a DigitalMicrograph script which opens all images containing a specific string in the file name. I know how I can open an image using OpenImage( filename ) and I have seen in the documentation that a command GetFilesInDirectory() exists, which seems to be what I need. However, I do not understand how I can use this command. Can somebody give me a code snippet demonstrating this, please? 回答1: The command GetFilesInDirectory() gives you a TagList of all files / subfolders

How could I open more than one image with a single dialog in Digital Micrograph script?

狂风中的少年 提交于 2019-12-02 03:57:36
I am writing in DigialMicrograph scripting. I want a script to open more than one image in a single dialog, a multi-select image dialog, similar to when you go to any Windows open dialog, select several images and press Ok. I think that this is possible but I haven't found a way to do it. I want to introduce this specific code in my script, to avoid image-opening prior to running the script. I know the function OpenDialog but this only allows opening of a single image. Could anybody show me some script or a function which can help me further? Thanks. What you are asking for might be a bit more

How to arbitrarily extract a specific subset of images from a dataset?

▼魔方 西西 提交于 2019-12-02 03:45:34
Recently I'm planning to manipulate a stack of images and the goal is to extract a specific subset of slices from there, for example only even or odd or arbitrary indexes, and then save them into another dataset. In DM, there are a number of helpful functions in the Volume menu but unfortunately, they cannot really fullfill what I want to do. I am just wondering whether this idea can be realized via scripting. Many thanks for your help in advance. There are two ways you can go about it, one of them only suitable for data up to 3D and generally slower than the other, but more flexible. As you

Is it possible for a DigitalMicrograph script object to be notified of an ROI change on an image?

社会主义新天地 提交于 2019-12-02 03:08:19
The DigitalMicrograph scripting documentation alludes to various types of Listener objects that can be used to notify a script object of various types of events. In particular, ImageDisplay objects have explicit support for key listeners so that a script object can be notified when a keystroke event is targeted to a specific image display. Is it possible to receive notification that an ROI on an image has been changed in size or position via a similar mechanism? Yes there are. In fact, as far as ROIs are concerned there are two possibilities. First option: Listen to a specific ROI Any ROI in