This isn’t strictly a
SimpleITK issue, but I am wondering how to handle such an issue using
SimpleITK. I have been given axial CT from a colleague (stored in DICOM format), and it contains 146 slices of dimension 512x512.
When I load each slice, I notice there are several slices that have the exact same origin coordinate in physical space. In other words, these are duplicate slices.
First, can anyone offer any insight into why a DICOM series might contain duplicate slices? This isn’t a one-off occurrence, among the thousands of CTs I have, this occurs every so often.
Second, is there a rigorous way to handle such an occurrence? Currently, my approach has been to read in each
.dcm file independently, extract the origins with
GetOrigin(), order by origin values, identify duplicates, and randomly select one slice among the duplicates. This leaves with with a new list of files that only
contain unique slices. I can then use this set of files to read in the whole series (and write out to NRRD for other purposes).
I am under the impression that
SimpleITK uses the difference in the Z-dimension for the first two slices (in physical order) to determine the slice thickness/spacing. So when the first slice is duplicated, the difference is zero, and
SimpleITK defaults to unit-spacing.
When the duplicate slices are anywhere else in the stack, it just breaks
SimpleITK from ordering the series properly, and the result is an image with slices ordered according to file name, rather than slice location.
I would really appreciate any insights. Thanks.