Get started
DICOM Handling
The espadon package allows direct analysis of DICOM files.
The following instructions allow , for example, to create a table (R dataframe), and thus to have a synthetic view of the DICOM file content.
dcm.filename <- file.choose ()
df <- dicom.parser (dcm.filename, as.txt = TRUE, try.parse = TRUE)
If you prefer a nested list, just type this instruction
L <- dicom.parser (dcm.filename, as.txt = FALSE, nested.list = TRUE)
A file in .xlsx format can also be created with the xlsx.from.dcm() function.
Thanks to the dicom.set.tag.value() function, the content of the various tags can be modified or deleted, as far as they are in ascii format.
The dicom.raw.data.anonymizer() function provides pseudonymization of a DICOM file by shifting dates, changing the patient’s PIN and name, removing all patient data except age, weight, and height, and also removing any other name, phone, operator, service, and undocumented tag content.
If you want to anonymise several patient files, use the dicom.patient.anonymise() function as follows:
pat.dir <- choose.dir()
an.pat.dir <- "anonymous_patient"
dicom.patient.anonymiser (dcm.files = pat.dir, pat.dest.dir = an.pat.dir,
offset = 0, new.PIN = "Anonymous patient",
reset.private.tag = TRUE)
When you load a DICOM object with espadon (RT-struct, RT-dose, CT, etc.), it becomes an espadon object.
It is then possible to export these espadon objects as DICOM files, using the export() function.