dicom-deid-tool-core
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

Introduction

deid_upload_tool_core is a library for anonymizing tags values in DICOM files.

Usage

import { anonymizeDicomArray } from "deid_upload_tool_core";

const filesToAnonymize: File[] = [/* Array of nonanonymized files */]
const patientNameAndIdMapping: IMapping = {} // mapping to set the same patient Name and Id for the same original values
const uuidMapping: IMapping = {} // mapping to set the same UUID for the same original values
const descriptionMapping: IMapping = {} // mapping to set the SeriesDescription for the same original values

anonymizeDicomArray(
    filesToAnonymize,
    patientNameAndIdMapping,
    uuidMapping,
    descriptionMapping,
    (progress, status, error) => {
        // Your function to follow current progress status
    },
    (success) => {
        // Your function to follow completion of processing files
    },
    (files) => {
        // Your function to submit processed files
    },
    (imageComments) => {
        // Your function to submit priginal imageComment tag values
    },
    (seriesDescriptions) => {
        // Your function to submit priginal seriesDescription tag values
    },
    {
        // Your maximum value of files array size for submitting periodically
        accumulatedSizeOfProcessedFiles: 536870912,  // 536870912 == 512 MB
        tagsToAnonymize: [] // Array of dicom tags to anonymize
    },

)

Download and install source code

git clone https://dev.azure.com/virtonomy-dev/External%20collaboration/_git/deid_upload_tool_core
cd deid_upload_tool_core
npm ci

Testing

Unit tests

npm run test

E2E tests

To prepare e2e tests:

npm run prepare:e2e

Run dummy ui (need to run in separate terminal):

npm run start-ui

To run e2e test:

npm run test:e2e

To run e2e test in headed mode:

npm run test:e2e:headed

Publish package to Azure Artifacts

  1. Ensure your .npmrc credentials are setup
  2. Update the package.json version number following semver
  3. Run the publish command
    • npm publish
  4. If all went well, your package is now available on our Azure Artifacts feed 🥳

3rd party libraries

This software uses typescript, dicom-parser and jest for testing

Readme

Keywords

none

Package Sidebar

Install

npm i dicom-deid-tool-core

Weekly Downloads

1

Version

1.4.1

License

ISC

Unpacked Size

469 kB

Total Files

62

Last publish

Collaborators

  • wenyang.chu