

// Script function: Create FFT from an image
// Requirement: Open at least one 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( "No image displayed." )
 
imageDisplay EMDisplay = GlobalSinoImage.ImageGetImageDisplay(0)
 
if ( 1 != EMDisplay.ImageDisplayGetDisplayType() )
Throw( "No raster image displayed." )
 
ROI MyField = EMDisplay.ImageDisplayGetROI(0)
 
NewLiveFFT(EMDisplay,MyField,0)
 
