We present a spectral-based method for the 2D/3D rigid registration of X-ray images to a CT scan. The method uses a Fourier-based representation to decompose the six rigid transformation parameters problem into a twoparameter out-of-plane rotation and a four-parameter in-plane transformation problems. Preoperatively, a set of Digitally Reconstructed Radiographs (DRRs) are generated offline from the CT in the expected in-plane location ranges of the fluoroscopic X-ray imaging devices. Each DRR is transformed into a imaging device in-plane invariant features space. Intraoperatively, a few 2D projections of the patient anatomy are acquired with an X-ray imaging device. Each projection is transformed into its in-plane invariant representation. The out-of-plane parameters are first computed by maximization of the Normalized Cross-Correlation between the invariant representations of the DRRs and the X-ray images. Then, the in-plane parameters are computed with the phase correlation method based on the Fourier-Mellin transform. Experimental results on publicly available data sets show that our method can robustly estimate the out-of-plane parameters with accuracy of 1.5° in less than 1sec for out-of-plane rotations of 10° or more, and perform the entire registration in less than 10secs.