Store imageData as an attribute of Main