adapted histogram select with raster