// Script function: Bring the two earliest opened images to front and assign mirror/Identical Rectangle ROI on them // Requirement: At least open two images // 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 number GlobalSinoImage = CountImageDocuments() imageDocument ForEMImageA = GetImageDocument( GlobalSinoImage-1 ) image EMImageA := ImageDocumentGetImage( ForEMImageA, 0 ) imageDocument ForEMImageB = GetImageDocument( GlobalSinoImage-2 ) image EMImageB := ImageDocumentGetImage( ForEMImageB, 0 ) ROI MyROI = NewROI(); ROISetRectangle(MyROI,0,200,250,300) MyROI.ROISetVolatile( 1 ) // 0 is for Annotation, 1 is for ROI if ( TwoButtonDialog( "Add Mirror ROI?", "Mirror ROI", "Cancel" ) ) { EMImageA.ImageGetImageDisplay(0).ImageDisplayAddROI( MyROI ) EMImageB.ImageGetImageDisplay(0).ImageDisplayAddROI( MyROI ) // The Mirror ROIs can be moved simultaneously } else { Exit(0) }