Refactored polygon selection to use ROI directly and fixed SCI-1704