Merge all image files in same folder into one single DICOM file, plus include .txt & .htm as DICOM SR

Job ID: 32516872

Budget: $10 – $30 AUD

Please use Python, to pack all image files (for example .jpg and .png files in the same directory) into one single DICOM file (for example out.dcm). There may be thousands of images in the directory.

You may find this useful:
https://stackoverflow.com/questions/68939302/create-a-dicom-from-multiple-jpg-images
https://pydicom.github.io/
https://pycad.co/convert-jpg-or-png-images-into-dicom/

In addition, please add all .txt and .htm files (if exist) into the same DICOM file as DICOM SR. You may find this useful:
https://pydicom.github.io/pydicom/stable/tutorials/sr_basics.html

Please use the following versions software:
Python 3.9.7
Pydicom 2.2.2
Numpy 1.21.2
Pillow 8.4.0
Windows 10 (64 bit)

The final dicom file needs to be viewable using Microdicom & Weasis:
https://www.microdicom.com/downloads.html
https://nroduit.github.io/en/getting-started/download/
Related categories: Python Image Processing