3.1. Medical Image Format FAQ
DICOM Entry in Medical Image Format FAQ
3.2. Position/Orientation Information
DICOM uses a "Tag" to retrieve "Attribute Name" information. The documentation can be found in the DICOM specification. The image position and the image orientation section is in Part 3:Information Object Definition, C.220.127.116.11.1 and C.18.104.22.168.1.
The DICOM coordinate system is the LPS (left-posterior-superior), meanwhile the RAS coordinate system is right-anterior-superior.
The tag for the image position is (0x20, 0x32) and returns the x, y, z position of the upper left-hand corner of the image (the center of the first voxel).
The tag for the image orientation is (0x20, 0x37) and it returns the direction cosines of the first row and the first column with respect to the patient: first the value for the row x, y, z and then the value for the column x, y, z. For example, I get the string of the form "0.00000\\1.00000\\0.00000\\0.00000\\0.00000\\-1.00000".
The tag for the patient orientation is (0x20, 0x20) and it returns the position relative to the image plane by two characters with respect to the positive row axis (left to right) and the positive column axis (top to bottom). The character used are A(anterior), P(posterior), R(right), L(left), H(head), and F(foot). For example, the string I got was "P\\F" (posterior, foot).