The dm3/dm4 files contain the acquisition parameters and other information in its unique data structure: "TagGroup". In this example, I will show you how to extract the information from an existed taggroup.
The tag structure in an SI image is like this:
The following code will show how to obtain the operation voltage from the tag group
======================================================
// An example shows how to extract info from an existed taggroup
image src := GetFrontImage()
TagGroup tg = src.ImageGetTagGroup()
TagGroup parenttg
string path, label
// Asign tag path
If (!GetString("Enter path to tag", "Microscope Info:Voltage", path)) Exit(0)
result("path : " + path + "\n")
tg.TagGroupParseTagPath(path, parenttg, label)
parenttg.TagGroupOpenBrowserWindow("Parent of "+label, 0)
// Get value from a given path
number val
TagGroupGetTagAsFloat(tg,path,val)
result(label + " : "+val+"\n")
==========================================================
Output:
**********************************
path : Microscope Info:Voltage
Voltage : 200000
**********************************
Comments
Post a Comment