HistogramNd: add per dimension region testing