Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

ecg-dicom-web-viewer

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecg-dicom-web-viewer

Together with the cornerstone library, this project allows reading and drawing ECGs from a dcm in web version.


Version published
Weekly downloads
45
increased by9.76%
Maintainers
1
Weekly downloads
 
Created
Source

ecg-dicom-web-viewer

This library allows viewing an ECG file in DICOM format in web view.

  • NPM: https://www.npmjs.com/package/ecg-dicom-web-viewer

Installation

This module is distributed via [npm][npm-url] which is bundled with [node][node] and should be installed as one of your project's dependencies:

// To install the newest version
npm install --save ecg-dicom-web-viewer

Example

  1. Once installed import the project.
// Import
import {
  ReadECGData,
  DrawGraphs,
  Constants,
  DicomECGViewer,
} from "ecg-dicom-web-viewer";
  1. Instantiate the new class with the necessary data and create the view.
//Load view:
let viewer = new DicomECGViewer(
  byteArray, //Data array ECG (XMLHttpRequest response array or...local open data)
  divView, //Div where to draw the view
  viewportIndex //View number, since you can have several views.
);
viewer.loadECG(); // Create ECG View.

Result

Documentation

Currently it works:

  • Sop12LeadECGWaveformStorage: '1.2.840.10008.5.1.4.1.1.9.1.1', --> YES
  • GeneralECGWaveformStorage: '1.2.840.10008.5.1.4.1.1.9.1.2', --> YES
  • AmbulatoryECGWaveformStorage: '1.2.840.10008.5.1.4.1.1.9.1.3', --> NO SUPPORT
  • HemodynamicWaveformStorage: '1.2.840.10008.5.1.4.1.1.9.2.1', --> YES
The next available classes are as follows:
  • Class ReadECGData
  • - readData(dataSet)

    Receives a dataSet data structure and returns a readable array.

    - getDataSet(dataDICOMarrayBuffer)

    Read the arraydicombuffer and return dataSet.

  • Class DrawGraphs
  • - drawData()

    Allows you to draw the ECG graph.

    - noCompatible()

    If the ECG is not compatible it will draw an incompatibility view.

    - drawLoader() & removeLoader()

    Draw or erase a spinner while loading data.

    - addDOMChart()

    Draws the data structure in the DOM.

    - drawLine()

    Draw the lines of the ECG.

    - bindChart(chartId, channelData, yAxis)

    Create and generate the line with the c3 library.

  • Static Constants
  • SOP UID of ECG types and graph measurements.

  • Class DicomECGViewer
  • - constructor(dataDICOMarrayBuffer, canvas, patientData, nameView)

    dataDICOMarrayBuffer DICOM DCM ECG Array Buffer.

    canvas Draw ID View.

    patientData Patient Data, default null: patientData = { NAME, PATIENT_ID, BIRTH, SEX, DATE, DESCRIPTION }

    nameView Identifier of the view you want to put, in case you have several views, default 0.

    - createView()

    Generates the DOM structure.

    - loadECG()

    Load the data of the graph and draw the content, it is the main method.

    Features

    • Generate the graph instead of using the c3 library (since it takes time to load), generate a canvas with the most personalized graph and actions such as scrolling or others. Calibrate Sop12LeadECGWaveformStorage and GeneralECGWaveformStorage to make it look good.

    Keywords

    FAQs

    Package last updated on 09 Aug 2022

    Did you know?

    Socket

    Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

    Install

    Related posts

    SocketSocket SOC 2 Logo

    Product

    • Package Alerts
    • Integrations
    • Docs
    • Pricing
    • FAQ
    • Roadmap
    • Changelog

    Packages

    npm

    Stay in touch

    Get open source security insights delivered straight into your inbox.


    • Terms
    • Privacy
    • Security

    Made with ⚡️ by Socket Inc