396 questions
Advice
2
votes
3
replies
31
views
SaveImage() does not seem to update 'File location' under: Image Info/Image/Info
SaveImage() does not seem to update 'File location' under: Image Info/Image/Info
Is there a command for adding the file location? I could close and re-open the file, but that seems burdensome ...
1
vote
1
answer
61
views
What is the most efficient way to convert 2D image to 3D tiles that overlaps
In previous thread "How to use SliceN to convert 2D image to 3D tiles" @BmyGuest has demonstrated two efficient ways other than the direct expressions approach. Here I would like to extend ...
2
votes
1
answer
53
views
How to access scale bar label text?
I’m working with Gatan DigitalMicrograph (DM-script) and trying to programmatically access the label text shown on a scale bar, such as "200 nm" or "10 μm".
I assumed this ...
3
votes
1
answer
54
views
How can I check if an image is currently displayed in Gatan DigitalMicrograph?
I'm developing a script in Gatan DigitalMicrograph (DM-Script) and need to determine whether a specific image is currently being displayed in the software UI.
So far, I've tried several approaches, ...
1
vote
1
answer
53
views
How to synchronize selection regions between original profile and its derivative plot in DM?
I'm working with dm-script to process a raw profile. I first calculate its first derivative to detect edges, and then let users select a region between these edges in the derivative plot. However, I'd ...
2
votes
1
answer
68
views
How to Apply Band Pass Filter to a 3D Stack in DigitalMicrograph
In Gatan software, I found that the Band Pass Filter in Process Image can only be applied to a single 2D image or a specific frame of a 3D image. My dataset is a 3D stack (multiple frames), and I need ...
3
votes
1
answer
44
views
Install script object in "Window" menu as first menu item (before "Floating Windows")
Apparently the "Window" menu cannot be accessed directly by scripts. The following code return a null script object:
Object objMB = GetMenuBar();
Object objWindowMenu = objMB....
1
vote
1
answer
66
views
Line profiles of RGB image in GMS3.6
I'd like to obtain line profiles of RGB components of an RGB image.
I think the former version of GMS can show RGB line profiles from line profile tool.
(I'm sorry if I misunderstand.)
However, when I ...
3
votes
1
answer
50
views
Is there a scripting call that is identical to the menu 'File/Open' (Ctrl+O)
With the menu File/Open I can pick a directory and a file within. Is there a scripting call that returns the path and file name? boolean OpenFile(string directory, string filename)
2
votes
2
answers
79
views
Managing tag paths shared by different scripts
Is there an efficient and elegant way to managing tag paths used by different scripts? For example, I have one script to write certain metadata in to an image:
// common tag group paths
string ...
1
vote
1
answer
148
views
Split mrc file into pieces by using DM script
I'm working with Digital Micrograph (DM) and have an MRC file that contains 10 distinct pieces. When loaded in DM, I can navigate through these pieces using the left and right arrow keys. I'm looking ...
2
votes
2
answers
66
views
Some letters are cut in the checkbox lables
I run the typical example of DLGCreateDialog in GMS 3.2.xx and GMS 3.5.xx
TagGroup DLG, DLGItems
DLG = DLGCreateDialog( "Please enter strings", DLGItems )
TagGroup opt1tg = DLGCreateCheckBox(...
1
vote
1
answer
45
views
Keep a oval annotation as a circle by using dm-script
I'm working with DM script on an FFT image where I manually change the size of a circular region. However, when I adjust the size, the circle either shifts away from the FFT image's center or ...
3
votes
1
answer
46
views
Regular expressions in dm script
Does the Digital Micrograph scripting language have any built-in support (not including Python) for regular expressions?
Looking through the built-in documentation I do not see any reference to regex ...
1
vote
2
answers
78
views
How can I create an integer-only slider widget in DM script?
I'm trying to add a slider widget to a Digital Micrograph (DM) script interface, and I need the slider's value to be an integer. Unfortunately, I haven't found any specific documentation in the DM ...
0
votes
1
answer
43
views
Why isn’t the ROI length updated immediately after changing the image scale?
I’m working with a profile that displays the ROI length of an image. I need the profile to reflect the updated ROI length immediately after I change the scale of the image. However, when I run the ...
0
votes
1
answer
50
views
How can I create a reusable timing function in dm-script that accepts another function as a parameter?
I'm working in dm-script and need to measure the execution time of various functions. Currently, I use the following pattern to measure time:
Number time1, time2
time1 = GetCurrentTime()
// run some ...
0
votes
1
answer
54
views
How can I retrieve the measured length from a profile image? [closed]
I'm working with profile images and need to extract the measured length from them. Initially, I assumed that the measurement might be a component, but when I used TagGroupCountTags, it indicated that ...
0
votes
1
answer
85
views
How can I remove both line annotations and their associated length text while preserving other text components?
I'm working with an image in dm-script where using a line with a length label creates both a line and a text component (displaying the length) on the image. I want to remove both the line annotations ...
0
votes
2
answers
38
views
Why does TagGroupAddLabeledTagGroup return src_tag_group?
I'm trying to understand the design rationale behind the following dm-script function:
TagGroup TagGroupAddLabeledTagGroup(TagGroup tgt_tag_group, String label, TagGroup src_tag_group)
The function's ...
1
vote
1
answer
66
views
How to correctly create sub-dialogs from within dialogs?
What's the difference for the two methods of UI initiator?
I’m building a UI with a sub-dialog and need it to appear only when a user clicks a button. However, I’m encountering different behaviors ...
0
votes
1
answer
61
views
What is the purpose of the container_items argument in box, tab, or group creation?
I'm working with a UI library where I create containers such as tabs, boxes, and groups. These functions take a parameter called container_items (or items) as one of their arguments:
DLGCreateTab( ...
0
votes
1
answer
51
views
How can I list all tag details in a TagGroup file using the Python API?
I'm working with a TagGroup file (with a .gtg extension) that contains multiple layers of information. For example, my file looks like this:
top_layer:mid_layer1,true
top_layer:mid_layer2,'abc'
...
0
votes
1
answer
57
views
How to trigger opening html file by default browser in GMS
I'd like to use LaunchExternalProcess to trigger opening html file in GMS. I have tested the command in cmd, and it works.
The cmd command is
start X:\Manual\index.html
But if I use the code below in ...
0
votes
1
answer
49
views
Unexpected Behavior in RealField Widget Threshold Validation
I'm trying to enforce a value threshold on a realfield input widget in DM-script such that valid values are between 0 and 0.05. When I input 0.06 and click outside the widget, it warns that the value ...