DICOM Web Anonymizer is a TypeScript library designed to anonymize DICOM (Digital Imaging and Communications in Medicine) datasets. It provides a robust solution for removing or modifying sensitive patient information while preserving the integrity of medical imaging data.
- Anonymizes various DICOM elements including patient identifiers, names, dates, and addresses according to the DICOM Standard
- Customizable anonymization rules
- Preserves DICOM data structure and integrity
- Handles complex DICOM elements like sequences
- Applicable in web-bowsers
npm install dicom-web-anonymizer
Here's a basic example of how to use the DICOM Web Anonymizer:
import Anonymizer from 'dicom-web-anonymizer';
import { data } from 'dcmjs';
// Create an instance of the Anonymizer
const anonymizer = new Anonymizer();
// Load your DICOM dataset
const dataset = data.DicomDict.fromDicomJson(/_ your DICOM JSON data _/);
// Anonymize the dataset
await anonymizer.anonymize(dataset);
\
// Your dataset is now anonymized
console.log(dataset);
The main class for anonymizing DICOM datasets.
constructor(options?: AnonymizerOptions)
anonymize(dcmDict: data.DicomDict): Promise<void>
Anonymizes the given DICOM dataset.
Configuration options for the Anonymizer.
protectedTags?: string[]
: List of DICOM tags to leave unchangedanonymizePrivateTags?: boolean
: Whether to anonymize (delete) private tagsidPrefix?: string
: Prefix for anonymized IDsidSuffix?: string
: Suffix for anonymized IDsseed?: string
: Seed for the random number generator
This project is licensed under the MIT License - see the LICENSE file for details.