Added median option to statistics transform