Is it possible in DM-script to take an ImageDisplay containing multiple layers and separate those layers into different image windows? And conversely, is it possible to overlay separate displays to form one multi-layer display through script?
My goal is to take a LinePlotImageDisplay containing multiple LinePlot layers and separate them so I can perform background subtraction on each of them individually. I then want to perform signal extraction on each of them, and then combine those separate signal LinePlots into one image.
I've tried working around the need to separate the layers by re-ordering them. I know that manually you can right click a layer and select "Send to > Back" and this will result in background subtraction being applied to whatever layer is now at the back. I tried calling LinePlotImageDisplaySetSlice(), but that didn't affect the ordering as I was hoping.
The key to extracting the image data of individual slices of a LinePlotImageDisplay object is illustrated in Example 7: Selecting and hiding slices of the following section of DigitalMicrograph's on-line help (accessed via the Help > Search... menu command, or F1 in GMS3): Scripting > Example Scripts > Data Display > Changing LinePlot ImageDisplays. The trick is to use the selection operator,
{ }, with the sliceID of the desired slice, applied to the Image reference of the multi-slice image of interest, as shown by the second line of theforloop over the slices in the example script:where
frontis a reference to the front image, the target in the example script.Once one has an Image reference for the desired slice, it can be cloned and shown in a new window, as follows:
For combining spectral data into an overlayed LinePlotImageDisplay with multiple slices, see Example 1: Creating multi-slice LinePlots in the above cited section of DM's on-line help.
The above is true for GMS version 3.5.3. If you are using an older version and the above does not work, please provide details of the GMS version and any script code you have tried.