Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
Hi Howard,
You could then build a script that contains all of the mappings you need in one script file. That would probably be less performant overall, since changing one value would require running through an entire script on each execution, but it may not be too bad and might be useful if it’s more difficult to map out the folders.
Hi Howard,
You could use DicomRemap to do this pretty easily, although exactly HOW you do it could vary.
Basically you want to set your tag to a particular value. If you have your sessions divided into folders—that is, you know that all of the files in folder X should have StudyInstanceUID 1.2.826.0.1.3680043.9.5830.1, you can create a script, maybe by folder name, so X.das:
(0020,000D) := "1.2.826.0.1.3680043.9.5830.1"
Then run this against files from study X:
DicomRemap -d X.das -o Xresult X/*
This will copy all of the files from X into Xresult, applying the script from X.das. Repeat for Y and Z. Since you have thousands of cases, you’ll want to automate this with a bash script or something similar, but it’s basically just a matter of mapping the correct UID to the correct source study and writing that out to the appropriate destination for each of those thousands of cases.
You can also write a single script that uses conditionals to set the appropriate value. So, for example, to go from 00234 to 1.2.826.0.1.3680043.9.5830.234, your script would look like this:
(0020,000D) = "00234" : (0020,000D) := "1.2.826.0.1.3680043.9.5830.234"
You could then build a script that contains all of the mappings you need in one script file. That would probably be less performant overall, since changing one value would require running through an entire script on each execution, but it may not be too bad and might be useful if it’s more difficult to map out the folders.
HTH.
--Rick Herrick
....