Performance improvements to OSIROIMask