Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Latest commit

 

History

History
54 lines (32 loc) · 1.33 KB

README.md

File metadata and controls

54 lines (32 loc) · 1.33 KB

// // // //

Project moved to --> https://github.com/UMEssen/DicomDeidentify

// // // //

CI/CD Status: Build Status

DICOM De-Identify

A small and configurable Scala library to de-identify DICOM files according to http://dicom.nema.org/medical/dicom/current/output/html/part15.html#table_E.1-1.

Using

Add as as a dependency to your project. Start coding.

de.stereotypez.Deidentify

val din = new DicomInputStream(new File("yourfile.dcm"))
val fmi = din.readFileMetaInformation()
val att = din.readDataset(-1, -1)
din.close()

// runs with side effects (will modify 'att')
Deidentify()
  .keep(Tag.PatientSex, Tag.PatientSize, Tag.PatientWeight)
  .withOptions(RetainLongModifDatesOption)
  .execute(att)

// write to new DICOM file
val dout = new DicomOutputStream(new File("de-identified.dcm"))
dout.writeDataset(fmi, att)
dout.close()

Running the tests

mvn test

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments