/// <summary> /// Example *required* by the Anonymisation Engine /// </summary> /// <returns></returns> public static List <AnonExample> LongHashIDExamples() { var output1 = new AnonExample(); var value = "1.2.34567"; var item = new DicomUniqueIdentifier(DicomTag.ConcatenationUID, value); output1.Input.Add(item + ": " + value); AnonExample.InferOutput( item, LongHashID(null, null, item), output1); var output2 = new AnonExample(); value = string.Empty; item = new DicomUniqueIdentifier(DicomTag.ConcatenationUID, value); output2.Input.Add(item + ": " + "<empty>"); AnonExample.InferOutput( item, LongHashID(null, null, item), output2); return(new List <AnonExample> { output1, output2 }); }
/// <summary> /// Example *required* by the Anonymisation Engine /// </summary> /// <returns></returns> public static List <AnonExample> KeepItemExamples() { var output = new AnonExample(); var value = "M"; var item = new DicomLongString(DicomTag.PatientSex, value); output.Input.Add(item + ": " + value); var dicomItem = KeepItem(null, null, item); AnonExample.InferOutput(item, dicomItem, output); return(new List <AnonExample> { output }); }
/// <summary> /// Example *required* by the Anonymisation Engine /// </summary> /// <returns></returns> public static List <AnonExample> RandomiseDateTimeExamples() { var dateTime = new DateTime(2018, 2, 15, 3, 20, 58); var dicomItem = new DicomDateTime(DicomTag.CreationDate, dateTime); var dataset = new DicomDataset() { { DicomTag.PatientID, "TEST" }, { dicomItem }, }; var output = new AnonExample(); output.Input.Add(dicomItem + ": " + dateTime); AnonExample.InferOutput(dicomItem, RandomiseDateTime(dataset, null, dicomItem), output); return(new List <AnonExample> { output }); }