Skip to content

Instantly share code, notes, and snippets.

View gofal's full-sized avatar

Reinhard Gruber gofal

  • Austria
View GitHub Profile
private static void ConvertDicomToText()
{
var dicomfile = Dicom.DicomFile.Open(@"D:\dicom\fo-dicom\gh-1083\dx.dcm");
var output = new StringBuilder();
var indentation = 0;
WriteDataset(dicomfile.Dataset, indentation, output);
System.IO.File.WriteAllText(@"D:\dicom\fo-dicom\gh-1083\dx.txt", output.ToString());
}
private static void WriteDataset(DicomDataset ds, int indentation, StringBuilder output)