import arr
#get the image and find the size of the image
img=GetImageMatr('Valve')
rows,cols=img.dim()
#define a ROI covering nearly all image
offs=20
roi=arr.xyfVec(4,'ROI')
roi[0]=offs,offs
roi[1]=offs,cols-offs
roi[2]=rows-offs,cols-offs
roi[3]=rows-offs,offs
ovl=GetOverlay('Valve','Custom')
ovl.clear()
ovl.add(roi).closed=1