Added resampling into GUI.