This paper reports numerical simulations of spatial filtering using optical fibers or integrated optics components. The filtering capability of the waveguide is evaluated by launching a non-guided optical field and measuring the power rejection along the propagation, over a given integration area. The Beam Propagation Method (BPM) allows to compute the transverse field distribution all along the guide, whose refractive index profile has been defined beforehand. This work is focused on the study of straight waveguides.© (2003) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.