2

I want to insert dummy data in dicom file without reading that file using LEADTOOLS. For ex. I want to insert

 Patient_Name = xyz etc.

So anybody have any idea that which LEADTOOLS method is used to insert/edit patients data in a dicom file.

Namrata
  • 173
  • 8

1 Answers1

2

Try this

dicomdataset.InsertElementAndSetValue(DicomTag.PatientName, "Namrata");

DicomElement element = ds.FindFirstElement(null, DicomTag.PatientName, false);
  if (element == null)
  {
     element = ds.InsertElement(null, false, DicomTag.PatientName, DicomVRType.PN, false, 0);
  }
Eklavya
  • 36
  • 5