Hi,
I'm a radiologist with a Teaching File of hundreds of thousands of images in thousands of folders. (An OsiriX Database)
The present contents of Tag 0020, 000d (StudyInstance UID) violates the DICOM standard.
It takes the form of 00001 (etc.) corresponding to the Case Number of the case in my Teaching File.
-----------
I now have my own "UID root": 1.2.826.0.1.3680043.9.5830.1
I would like a script to go through the entire Database, changing the contents of only this Tag (for every .dcm file) as follows (two examples):
00001 >> 1.2.826.0.1.3680043.9.5830.1.1
02988 >> 1.2.826.0.1.3680043.9.5830.1.2988
(All leading zeros in the number are removed before appending it to the root.)
If the Tag has the correct format, it should be left alone. New cases I've added recently have the correct format for this Tag.
Is anyone in the Group willing to write the necessary script for me ? I'd really appreciate it. As would my radiologist-colleagues with the same problem :-)
Of course, I can provide a cohort of cases (as they exist in the OsiriX Database) to test the script if necessary.
Sincerely,
Howard Mann