This work considers the efficient coding of hyperspectral images. The shape-adaptive DCT is extended to the three-dimensional case. Both the 3D-SA-DCT and the conventional 3D-DCT are combined with either of two alternative techniques for coding the transform coefficients. The proposed schemes are compared with two state of the art coding algorithms, which serve as benchmarks, and are found to have better performance (in terms of PSNR). Particularly good performance is shown by the coder based on the 3D-SA-DCT in a classification task applied to the coded images.