I want to add Dicom tags to a series of Dicom images and want to save that modified batch.
I have written a simple python script using pydicom which can edit and add dicom tags in a single Dicom image, but i want to do same procedure for complete image set (say 20 or 30 images).
can anybody suggest me a way to do such task using pydicom or python?
Just collect your filenames in a list and process each filename (read the file, edit contents, save as new or maybe use the same name).
Have a look at the os module from python. For instance, os.listdir('path') returns a list of filenames found in the given path. If that path points to a directory that contains only dicom images you now have a list of dicom filenames. Next use os.path.join('path', filename) to get an absolute path that you can use as input for reading a dicom file with pydicom.
Also you might want to use a for loop.
How to add dicom tags for a series of dicom images?