Add setOptions interface, test downsampling