Add option for resampling filter

This replaces #284