Disclaimer - I'm pretty new to dealing with DICOM data and am just getting familiar with the various tags.
I am involved in a project building an application for analysing medical imaging data (image processing) which is received directly from a hospital PACS. We use pydicom (thank you!) for storing DICOM files when received (we also use pynetdicom to handle receiving - thanks for that too!).
A series is received one file at a time and is stored using the file `SOPInstanceUID` as the filename. I have a test data set that I am working from that contains 176 images in the series. When using
to save each file in the series with the `SOPInstanceUID` I end up with files where the `StudyInstanceUID` no longer matches that in the original file and is different for each file in the series.
Can somebody explain what is going here please? Where did I go wrong?
Many thanks for your help in advance!