By the way, if you’re really interested in how MRtrix3 handles these things, the first place to look would be the DICOM::QuickScan
class - that will tell you which entries are actually read initially to sort the data, prior to doing a deeper scan through the particular series to be loaded.
Briefly, the process is to scan through all files in the specified folder (recursively if nested folders are found) using the QuickScan
class, which only reads those tags necessary to work out the contents of the folder. It then sorts these small entries into a tree structure by Patient / Study / Series / Image (code here). The code then allows the user to select one or more series (code here), and then performs a full scan of the files in that series to grab the information required to read the images as such - this is done via the Image & Frame classes, which read a lot more tags than the original quick scan (code here).