How to find number of images in a DICOM study?

9k views Asked by At

Is it possible to find number of images in a DICOM study by reading a DICOM header of a file in that study?

I am developing a Java application that receives DICOM studies from different sources. I just want to check if a study has been received completely.

Unfortunately I cannot rely on reading DICOMDIR as in many cases the studies do not have that file. I am also familiar with dcm4che and imageJ libraries.

Cheers, Arash

3

There are 3 answers

1
Brett Okken On

The number of study related instances tag (0020, 1208) is intended to be able to communicate this information. As you noted in a previous response, however, this is not reliable. The problem is that you are looking at a single instance of the study. It is effectively impossible to guarantee that the creator of that file knew (knows) about all current instances in that study. For example, a modality may know how many instances it creates and sends to the archive. However, at some later date evidence objects (such as presentation states, key objects or structured reports) can be added. This changes the number of instances in the study, but does not (necessarily) change any existing part 10 files.

0
David Simic On

The number of images in a series is not present in the dicom image file itself. This is auxiliary information, and the only way to obtain it is for someone to compute it after the fact and make it available to you.

This is often already done by the sender (with high certainty if it is a PACS) and can be made available to the receiver in a DICOM compliant manner via a Query / Retrieve request (keep reading to the end for details).

Contrary to what other answers have stated, dicom tag (0020, 0013) does not correspond to the number of instances within a series. Instead it identifies the instance within the series, and typically tracks the order in which the image was taken within that particular series.

As Brett stated in his answer, this is because it is effectively impossible for the creator of the file to truly know the final image count (due to all kinds of realities that can kick in) and so is not present in the file itself but needs to be determined after the fact.

The good news is that the sender should already have (and often will have if it is a PACS) done the counting for you, and will make this info available via DICOM tag "Number Of Series Related Instances (0020,1209)" via a Query / Retrieve.

There will also generally be a tag corresponding to number of series in the study, DICOM tag "Number of Study Related Series(0020,1206)."

To reiterate, these tags can often be obtained from a properly formed Query / Retrieve request to the sender, however they are not present in the image files themselves.

2
user3221250 On

We find number of Images in Tag.InstanceNumber (0020,0013).