Checkerboard and stripe inhomogeneities in cuprates