Oct-12-2021, 02:08 PM
(This post was last modified: Oct-12-2021, 02:15 PM by Yoriz.
Edit Reason: Added code tags
)
Hi,
I am using the following code to read one dicom file and write the info from that file to a text file.
I am using the following code to read one dicom file and write the info from that file to a text file.
ds=dicom.dcmread("mw_test.dcm") file=open("mw_test.txt","w+") file.write(str(ds)) file.close()How can I expand this code for reading multiple dicom files from a directory and write the contents in a text fie with the same file name?