CT is routinely used for radiotherapy planning with organs and regions of interest being segmented for diagnostic evaluation and parameter optimization. For cardiac segmentation, many methods have been proposed for left ventricular segmentation, but few for simultaneous segmentation of the entire heart. In this work, we present a convolutional neural networks (CNN)-based cardiac chamber segmentation method for 3D CT with 5 classes: left ventricle, right ventricle, left atrium, right atrium, and background. We achieved an overall accuracy of 87.2% ± 3.3% and an overall chamber accuracy of 85.6 ± 6.1%. The deep learning based segmentation method may provide an automatic tool for cardiac segmentation on CT images.