

// Script function: Remove all line 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 GlobalSinoDisplay = GlobalSinoImg.ImageGetImageDisplay( 0 )

number EMROI = GlobalSinoDisplay.ImageDisplayCountROIs() 

result ("The image has " + EMROI + " line ROIs before removal")

for ( number i = ( EMROI - 1 ) ; i >= 0 ; i-- )
{
 ROI MyX = GlobalSinoDisplay.ImageDisplayGetROI( i )
 if ( MyX.ROIIsLine() )
         GlobalSinoDisplay.ImageDisplayDeleteROI( MyX )
}

result ("\n\n")



