// Script function: Get leftmost and rightmost displayed channel
// Requirement: Open an 1-D (line profile) image

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
// by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html



image GlobalSinoImage := GetFrontImage()

showImage( GlobalSinoImage )
 
ImageDisplay EMDisplay = GlobalSinoImage.ImageGetImageDisplay(0) 

number EMLeftChannel, EMRightChannel

EMDisplay.LinePlotImageDisplayGetDisplayedChannels( EMLeftChannel, EMRightChannel )        // Get leftmost and rightmost displayed channel
 
result ("Left Channel: " + EMLeftChannel + "\n")
result ("Right Channel: " + EMRightChannel + "\n")
result ("\n")

