npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@scz/dcmjs

v0.33.2

Published

Javascript implementation of DICOM manipulation

Downloads

177

Readme

CI

Note: this code is a work-in-progress and should not be used for production or clinical purposes

This is a community effort so please help improve support for a wide range of DICOM data and use cases.

See live examples here

Goals

Overall the code should:

  • Support reading and writing of correct DICOM objects in JavaScript for browser or node environments
  • Provide a programmer-friendly JavaScript environment for using and manipulating DICOM objects
  • 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:

  • Use modern JavaScript programming methods (currently ES6) but avoid heavy frameworks
  • Leverage modern DICOM standards but avoid legacy parts
  • Support straightforward integration with multiple JavaScript deployment targets (browser, node, etc) and frameworks.

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 rendering. See dcmjs-imaging for this.

Usage

In Browser

<script type="text/javascript" src="https://unpkg.com/dcmjs"></script>

In Node

// To install latest _stable_ release
npm install --save dcmjs

// To install latest code merged to master
npm install --save dcmjs@dev

For Developers

git clone https://github.com/dcmjs-org/dcmjs
cd dcmjs
npm install
npm run build
npm test

For Maintainers and Contributors

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 fix not Fix or feat not Feat, have a space after the : and make the PR github review title follow the SAME rules. It is the PR review title that determins the final commit message and will be used for semantic detection.

Note: a new package version will be published only if the commit comes from a PR.

Optional Tooling

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.

Community Participation

Use this repository's issues page to report any bugs. Please follow SSCCE guidelines when submitting issues.

Use github pull requests to make contributions.

Unit Tests

Tests are written using the Jest testing framework and live in the test/ folder. Test file names must end with .test.js.

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.

Status

Currently dcmjs is an early-stage development experiment, but already has valuable functionality.

Implemented

  • 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).

In development

  • Creation of (correct) enhanced multiframe DICOM objects from legacy image objects
  • Creation of (correct) derived DICOM objects such as Segmentations and Structured Reports

TODO

  • Create a test suite of input and output DICOM objects
  • Test interoperability with other DICOM implementations
  • Add documentation

History

Support

The developers gratefully acknowledge their research support: