In the Orthanc config file why aren’t modalities in DicomModalities section stored as an array? Wouldn’t that be the correct way? I’m not criticizing in any way just throwing a question out there.
I see it’s stored as a dict, which isn’t far from an array. In fact it’s sometimes called an associative array, and at least one language (PHP) even implements arrays as dicts, and uses numbers as the keys.
Naming the elements must have been useful for Orthanc, for example, for listing the possible modalities in a dropdown to the user.
Of course one could have used the AET or the ip as the display name. Or an inner attribute called “unique name”. But it makes sense to just store that information as the key of the array.
tl;dr: A dict is an array with names for each element. A unique name for each element is useful.