Following up from my github post here.
@zivy thanks so much for your helpful responses on the github thread. Pasting that below for reference
ImageSeriesReader_GetGDCMSeriesFileNamesas it returns the list of files sorted along the z direction so that the series reader can create the volume correctly. The series reader just receives a list of images, looks at the distance between the first two along the z direction and assumes that this is the spacing in z for all images.
In a generic setup reading DICOM isn’t trivial as volume slices can reside in different directories or more commonly you have files from multiple series (volumes and other non volume images) in the same directory.
To get a good handle on DICOM reading, please skim the following:
I completely understand the need for reading images based on spatial coordinates. I am dealing with a large amount of diverse data so I am precomputing the slice order using z-position (and/or x, y position) based on the type of data.
Does ImageSeriesReader_GetGDCMSeriesFileNames always assume data is axial, i,e. using the z position for sort?
In addition to sorting, are there any other benefits that GetGDCMSeriesFileNames provies?
Thanks for any input on this!