I have created a slope raster from a DEM and am trying to select only contiguous areas of slope less than 10 degrees. I have used the raster calculator to select that subset of slopes, but I only want to include areas that are contiguous (i.e. no gaps between pixels, as seen in the one linear raster area below, which is a road). I would also like to rule out areas of the slope raster that have significant pockets of slope that's steeper than 10 degrees (as seen in the blobs on both sides of the road).
Is there a focal or zonal function that can do this?