GetDateTime() public method

public GetDateTime ( Dicom.Data.DicomTag tag, System.DateTime deflt ) : System.DateTime
tag Dicom.Data.DicomTag
deflt System.DateTime
return System.DateTime
Ejemplo n.º 1
0
        private static void AnonymizeDatasetBasedOnStudyInfo(DcmDataset dataset)
        {
            var studyDate = dataset.GetDateTime(DicomTags.StudyDate, DicomTags.StudyTime, new DateTime(1800,1,1));
            var anonymizedName = studyDate.ToString("yyyyMMdd_hhmmss");

            dataset.SetString(DicomTags.PatientsName, anonymizedName);
            dataset.SetString(DicomTags.PatientID, "");
        }