Output pixel areas by block to handle large rasters.
Rename threshold function.