Ghost imaging and ghost diffraction with pseudo-thermal light generated by means of a programmable SLM