'What direction do the DICOM instance numbers grow along?

By direction I mean for example from a patient's head to bottom or from his bottom to head. The CHEST CT scans I have seen so far indicates that Instance Number 1 slice is usually the first one down from the upper part of the body but I don't know whether this is part of the standard or there are some other tags that I should inspect into to determine.



Solution 1:[1]

There is no rule in DICOM that requires the Instance Number to be related to the slice position in a particular way. The link of Bartloimiej shows that there is a rule how the slice coordinates defined by Image Position Patient (0020,0027) and Image Orientation Patient (0020, 0037) are related to directions in the patient's body (head, feet, etc.)

So if you want to apply spatial ordering, these attributes are what you want to use. Slice Location (0020,1041) will not help you as well:

C.7.6.2.1.2 [...] This information is relative to an unspecified implementation specific reference point.

For original (i.e. Image Type (0008,0008) is ORIGINAL\PRIMARY...) CT slices, it is quite safe to assume that some growth in the Z-Direction is always present in a volumetric dataset. But for MRI or for reconstructed CT-slices (MPR), you may find datasets in which slices are parallel to the xz or yz plane. If your application is supposed to handle such images, make sure to avoid division by zero...

Solution 2:[2]

Yes, the standard defines it. DICOM PS3.3, part C.7.6.2:

The direction of the axes is defined fully by the patient's orientation.

If Anatomical Orientation Type (0010,2210) is absent or has a value of BIPED, the x-axis is increasing to the left hand side of the patient. The y-axis is increasing to the posterior side of the patient. The z-axis is increasing toward the head of the patient.

There is also a tag (0020,0037), Image Orientation (Patient), which relates actual position of the patient to the global coordinate frame. In trunk CT it is almost always 1 0 0 0 1 0 (no rotation) and you don't need to deal with it. Otherwise, see comments under the link above.

Solution 3:[3]

You are correct. The chest CT series are sorted from head to feet. The slice closest to the head should have the lowest Instance Number.

I don't know if this is defined by the DICOM standard or not, but I have seen a lot of DICOM images and the convention is this:

  • AXIAL - sorted by Z axis high to low (head to feet)
  • CORONAL - sorted by Y axis high to low (back to front)
  • SAGITTAL - sorted by X axis low to high (right to left)

Notice in all cases, the first slice in the series will be farthest from the observer.

If you need to generate Instance Number, you should sort the images by the dot product of Image Position Patient and (1,-1,-1) from low to high. In the rare degenerate case (all dot products are the same), I don't know. Pick another direction to sort, but probably (0,-1,-1) would be a good choice.

EDIT: I just discussed this with a friend who is more experienced. He said it varies. Some departments prefer back to front order, some prefer front to back. Also some DICOM viewers will give users the choice of how the slices are sorted (by Instance Number, Slice Location, IPP, Content Time, etc)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 John Henckel
Solution 3