1.4.1 • Published 1 year ago
dicom-deid-tool-core v1.4.1
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
Ensure your .npmrc credentials are setup
Make sure your AD user is added to the Artifacts feed:
https://dev.azure.com/virtonomy-dev/External%20collaboration/_artifacts/feed/VirtonomyDevFeed/settings/permissionsFollow the "Credentials Setup" step here: https://learn.microsoft.com/en-us/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=windows%2Cclassic#credentials-setup
Update the package.json version number following semver
- https://semver.org/
- Commit this version change as
release: update to vX.X.X
- Run the publish command
npm publish
- 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
1.4.1
1 year ago