Diffraction properties of opaque disks outside and inside a laser cavity