We present a finite element method to analyze the spontaneous emission of a single quantum dot in photonic crystal slabs. Through changing the geometry of the photonic crystal slabs and the position of the quantum dot the spontaneous emission can be funneled into a mode that we desired efficiently. Different photonic crystal cavities and waveguides are demonstrated. The physical mechanism of this phenomenon is discussed and the application prospects of this design are proposed.