An intensity based six-degree image registration algorithm between cone-beam CT (CBCT) and planning CT has been developed for image-guided radiation therapy (IGRT). CT images of an anthropomorphic chest phantom were acquired using conventional CT scanner and corresponding CBCT was reconstructed based on projection images acquired by an on-board imager (OBI). Both sets of images were initially registered to each other using attached fudicial markers to achieve a golden standard registration. Starting from this point, an offset was applied to one set of images, and the matching result was found by a gray-value based registration method. Finally, The registration error was evaluated by comparing the detected shifts with the known shift. Three window-level (WL) combinations commonly used for image enhancement were examined to investigate the effect of anatomical information of Bony only (B), Bone+Tissue (BT), and Bone+Tissue+Air (BTA) on the accuracy and robustness of gray-value based registration algorithm. Extensive tests were performed in searching for the attraction range of registration algorithm. The widest attraction range was achieved with the WL combination of BTA. The average attraction ranges of this combination were 73.3 mm and 81.6 degree in the translation and rotation dimensions, respectively, and the average registration errors were 0.15 mm and 0.32 degree. The WL combination of BT shows the secondary largest attraction ranges. The WL combination of B shows limited convergence property and its attraction range was the smallest among the three examined combinations (on average 33.3 mm and 25.0 degree). If two sets of 3D images in original size (512 × 512) were used, registration could be accomplished within 10~20 minutes by current algorithm, which is only acceptable for off-line reviewing purpose. As the size of image set reduced by a factor of 2~4, the registration time would be 2~4 minutes which is feasible for on-line target localization.