Added support for getFramesNeeded in renderRoI