




class DetectorRoi(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
    def doRead(self):
		#data = caget(“PINK:GEYES:image2:ArrayData")        
        data = caget("TESTCAS:VAL", '[d', self.getHeight() * self.getWidth())        
        return Convert.reshape(data,self.getHeight(), self.getWidth()) #
        
    def getWidth(self):
        return 50

    def getHeight(self):
        return 20

add_device (DetectorRoi("detector_roi"), True)


add_device(RegisterMatrixSource("detector_roi_img", detector_roi), True)
detector_roi_img.polling = -500