better logic for rois and linescans