0.0.12 • Published 4 months ago

dcmjs-ecg v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

NPM version build MIT License

dcmjs-ecg

DICOM electrocardiography (ECG) rendering for Node.js and browser using Steve Pieper's dcmjs library.

Note

This effort is a work-in-progress and should not be used for production or clinical purposes.

Install

Node.js

npm install dcmjs-ecg

Browser

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

Build

npm install
npm run build

Usage

// Import objects in Node.js
const dcmjsEcg = require('dcmjs-ecg');
const { DicomEcg } = dcmjsEcg;

// Import objects in Browser
const { DicomEcg } = window.dcmjsEcg;

// Create an ArrayBuffer with the contents of the DICOM P10 ECG byte stream.
const ecg = new DicomEcg(arrayBuffer);

// Create rendering options.
const renderingOpts = {
  // Optionally provide the rendering speed in millimeter per second.
  // If not provided, the default value of 25 millimeter per second is used.
  speed: 25.0,
  // Optionally provide the rendering amplitude in millimeter per millivolt.
  // If not provided, the default value of 5 millimeter per millivolt is used.
  amplitude: 5.0,
  // Optionally apply a Butterworth low pass filter with 40Hz cut off frequency.
  // If not provided, the filter is not applied.
  applyLowPassFilter: false
};

// Render ECG.
const renderingResult = ecg.render(renderingOpts);

// Rendered waveform in SVG format.
const svg = renderingResult.svg;

// Array of key-value-unit objects containing waveform information and interpretation.
const info = renderingResult.info;

Please check a live example here.

Related libraries

  • dcmjs-dimse - DICOM DIMSE implementation for Node.js using dcmjs.
  • dcmjs-imaging - DICOM image and overlay rendering pipeline for Node.js and browser using dcmjs.

License

dcmjs-ecg is released under the MIT License.

0.0.12

4 months ago

0.0.11

8 months ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago