DICOMをいじる必要に迫られてのPython②
で、タグをいじってみると、意外に簡単に編集できました。
import dicom dcm = dicom.read_file("test.dcm") #If you want to change Patient Name in dcm as "Santa" dcm.PatientName = "Santa" dcm.PatientID = "001224" dcm.acquisitionDate = "20171224" dcm.save_as("tested.dcm") #creating a new dicom file
tagの消去も出来そうなので、それはおいおい。