ONYX-1716 Rework dicom data extraction algorithm