Note: this code is a work-in-progress and should not be used for production or clinical purposes
Overall the code should:
- Include a set of useful demos to encourage correct usage of dcmjs and modern DICOM objects
- Encourage correct referencing of instances and composite context when creating derived objects
- Current target is modern web browsers, but a set of node-based utilities also makes sense someday
Architectural goals include:
- Leverage modern DICOM standards but avoid legacy parts
Parts of DICOM that dcmjs will focus on:
- Enhanced Multiframe Images
- Segmentation Objects
- Parametric Maps
- Structured Reports
Parts of DICOM that dcmjs will not focus on:
- DIMSE (legacy networking like C-STORE, C-FIND, C-MOVE, etc). See the dcmjs-dimse project for that.
- Physical Media (optical disks). See this FAQ if you need to work with those.
- Image processing. See dcmjs-imaging for this.
// To install latest _stable_ release npm install --save dcmjs // To install latest code merged to master npm install --save dcmjs@dev
git clone https://github.com/dcmjs-org/dcmjs cd dcmjs npm install npm run build npm test
Publish new version automatically from commit:
Use the following "Commit Message Format" when drafting commit messages. If you're merging a 3rd party's PR, you have the ability to override the supplied commit messages by doing a "Squash & Merge":
Note: Be wary of
BREAKING_CHANGE in commit message descriptions, as this can force a major version bump.
Be sure to use lower case for the first letter of your semantic commit message, so use
It is advised to use the git-cz, i.e.:
- install git-cz
npm install -g git-cz
- how to commit
git-cz --non-interactive --type=fix --subject="commit message"
More info at git-cz.
Note: a new package version will be published only if the commit comes from a PR.
Use this repository's issues page to report any bugs. Please follow SSCCE guidelines when submitting issues.
Use github pull requests to make contributions.
Tests are written using the Jest testing framework and live in the
test/ folder. Test file names must end with
Pull requests should either update existing tests or add new tests in order to ensure good test coverage of the changes being made.
To run all tests use
npm run test. To only run specific tests use Jest's
.only feature. If you're using VS Code, an extension such as
firsttris.vscode-jest-runner can be used to step through specific tests in the debugger.
Read all about unit testing best practices here.
Currently dcmjs is an early-stage development experiment, but already has valuable functionality.
- Bidirectional conversion to and from part 10 binary DICOM and DICOM standard JSON encoding (as in DICOMweb)
- Bidirectional convertion to and from DICOM standard JSON and a programmer-friendly high-level version (high-level form is called the "naturalized" form in the code).
- Creation of (correct) enhanced multiframe DICOM objects from legacy image objects
- Creation of (correct) derived DICOM objects such as Segmentations and Structured Reports
- Create a test suite of input and output DICOM objects
- Test interoperability with other DICOM implementations
- Add documentation
- Based on DICOM Part 10 read/write code initiated by Weiwei Wu of OHIF, Steve Pieper developed further features and examples of creating multiframe and segmentation objects discussed with the community at RSNA
The developers gratefully acknowledge their research support:
- Open Health Imaging Foundation (OHIF)
- Quantitative Image Informatics for Cancer Research (QIICR)
- The Neuroimage Analysis Center
- The National Center for Image Guided Therapy
- The NCI Imaging Data Commons NCI Imaging Data Commons: contract number 19X037Q from Leidos Biomedical Research under Task Order HHSN26100071 from NCI