

// Script function: Remove all ROIs from a image
// Requirement: Open an images with ROIs

// 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 GlobalSinoImg

if ( !GetFrontImage( GlobalSinoImg ) ) Exit( 0 )

imageDisplay EMImg = GlobalSinoImg.ImageGetImageDisplay( 0 )

while ( 0 < EMImg.ImageDisplayCountROIs() )
{
 ROI GlobalSinoROI = EMImg.ImageDisplayGetROI( 0 )
 EMImg.ImageDisplayDeleteROI( GlobalSinoROI )
 }
