Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

dicomweb-node-client

zhiva-ai16MIT0.8.3

Implementation of DICOMweb node client code

dicom, dcmjs, dicomweb, wado-rs, qido-rs, stow-rs

readme

Build Status

DICOMweb Client

JavaScript client implementation of DICOMweb.

For further details please refer to PS3.18 of the DICOM standard.

Goal

This is work-in-progress and should not be used in clinical practice.

The main motivation for this project is:

  • Support for storing, quering, retrieving DICOM objects over the web using RESTful services STOW-RS, QIDO-RS and WADO-RS, respectively
  • Building a lightweight library to facilitate integration into web applications

Installation

Install the dicomweb-node-client package using the npm package manager:

npm install dicomweb-node-client

Building and testing

Build and test code locally:

git clone https://github.com/zhiva-ai/dicomweb-node-client ~/dicomweb-node-client
cd ~/dicomweb-node-client
npm install
npm run build

Usage

NodeJS

const DICOMWebNodeClient = require('dicomweb-node-client');

const url = 'http://localhost:8080/dicomweb';
const client = new DICOMwebClient.api.DICOMwebClient({url});
client.searchForStudies().then(studies => {
    console.log(studies)
});

JS Application

Exactly the same as node, you can import it as DICOMwebClient to be inline with original repo.

import * as DICOMwebClient from 'dicomweb-node-client';

const url = 'http://localhost:8080/dicomweb';
const client = new DICOMwebClient.api.DICOMwebClient({url});
client.searchForStudies().then(studies => {
    console.log(studies)
});

Direct browser import

<script type="text/javascript" src="https://unpkg.com/dicomweb-client"></script>
const url = 'http://localhost:8080/dicomweb';
const client = new DICOMwebClient.api.DICOMwebClient({url});
client.searchForStudies().then(studies => {
  console.log(studies)
});

Contributions

We made a for of the original dicomweb-client library and extended it with NodeJS support. If you're using this library you don't have to contribute us, but please contribute the amazing people responsible for the original implementation. More details on their GitHub: https://github.com/dcmjs-org/dicomweb-client#citation

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[0.3.2] - 2018-09-26

Added

  • Added DICOMWebClient.version and associated NPM script to make it easier to determine which version of the library is running in an application

Changed

  • Added Babel to the Rollup configuration to produce a transpiled version of the library which can run on all browsers above Internet Explorer 11

[0.3.1] - 2018-09-25

Fixed

  • Removed reference to 'window' so the library can be used in Node.js more easily

[0.3.0] - 2018-09-24

Added

Changed

  • Switched from console.error() to throw new Error() for invalid handling input

Fixed

  • Removed duplicated tests for StoreInstances

[0.2.0] - 2018-09-20

Added

  • Added support for STOW-RS StoreInstances

Changed

  • Switched from Mochify to Karma for running tests

Fixed

  • Fixed exit code from test.sh script to ensure Continuous Integration server properly reports failures.