A workpiece having an identification code is arranged on a workpiece carrier having coded therein, by a pattern made from a plurality of mutually separate regions of different density, at least one character of the identification code. The workpiece and carrier are scanned together by computed tomography, the regions or part of the regions and the densities thereof in the computed tomography scan are ascertained, the scan is oriented in response to at least the location of a straight line through two of these regions, the character that is coded by way of the density pattern of the plurality of regions is determined in the scan, and the oriented scan is processed in response to the coded character.