Add threshold parameter to Region1D class, clean up compilation warnings