added functions to Roi script that allows for the largest region of interest to be selected