public void showDICOMMetadata(String path) { try { var dicom_parser = new ZPI_Projekt_Anonimizator.Parsers.DICOMParser(); var table = dicom_parser.parseDocument(path); if (table == null) { promptUser("An error ocurred, unable to open the dicom file." + path); } else { var values = table.Rows[0].ItemArray; TextLine0.Text = table.Columns[0].ColumnName + ": " + values[0]; TextLine1.Text = table.Columns[1].ColumnName + ": " + values[1]; TextLine2.Text = table.Columns[2].ColumnName + ": " + values[2]; TextLine3.Text = table.Columns[3].ColumnName + ": " + values[3]; TextLine5.Text = "PATH: " + path; MetadataDocumentView.Visibility = Visibility.Visible; } } catch (Exception ex) { promptUser("An error ocurred, unable to open the dicom file."); } }
public void Setup() { DICOMParser = new ZPI_Projekt_Anonimizator.Parsers.DICOMParser(); path = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName + @"\resource\DICOM_files\test.dcm"; }