
// Script function: Find an image with a specific label (e.g. label "B" below)and then rename it.

// 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 img
string EMlabel = "B"        // this is the image letter
img := FindImageByLabel( EMlabel ) 

if ( !ImageIsValid( img ) )
 Throw( "No image with image letter '" + EMlabel + "' found." )

SetName(img, "This is the image that I found")