Add persistence support to GridROI and LinearROI