
// Script function: Shift a image in Y direction using "offset" command, comparying with the image without shift.
// Requirement: Open an 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

if ( !GetFrontImage( GlobalSinoImage ) )
Throw( "Please open an image first" )
 
GlobalSinoImage:=getfrontimage()
image EMNotShiftedImage = offset(GlobalSinoImage,0,0) // No image shift
showimage (EMNotShiftedImage)

number EMx, EMy
getsize( GlobalSinoImage, EMx, EMy )

image EMShiftedImage = offset(GlobalSinoImage,0,EMy/4) // The image is shifted for EMy/4 in Y direction, but the shift in x direction is 0.
showimage (EMShiftedImage)
