fixed flag for region selection. it was in the wrong place under runBtn function. also added flag and functionality to write output images to file. and there is commented code to select single pixel during add point stage.