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

ecg-dicom-web-viewer

Package Overview
Dependencies
Maintainers
0
Versions
17
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.

  • 2.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
57
decreased by-10.94%
Maintainers
0
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 {
  ReadECG, //Optional.
  Constants, //Optional.
  DicomECGViewer, //Principal.
} 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.loadCanvas(); // Load canvas 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', --> YES
  • HemodynamicWaveformStorage: '1.2.840.10008.5.1.4.1.1.9.2.1', --> YES
  • CardiacElectrophysiologyWaveformStorage: '1.2.840.10008.5.1.4.1.1.9.2.1', --> YES
The next available classes are as follows:
  • Class DicomECGViewer
  • - constructor(dataDICOMarrayBuffer, idView, nameView)

    dataDICOMarrayBuffer DICOM DCM ECG Array Buffer.

    idView Draw ID View. Recomended a div.

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

    - loadCanvas()

    Main method, draws the canvas and its entire view.

  • Class ReadECG
  • - ReadECG(this.dataDICOMarrayBuffer, '', opts)

    Receives a dataSet data structure and returns a readable array.

    optsspeed: 25, amplitude: 10, applyLowPassFilter: true

    - getWaveform()

    Read the arraydicombuffer and return legible data.

    - getInfo()

    Read the arraydicombuffer and return information data, example: BPM, Name, Duration ECG...

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

  • Class GenericCanvas
  • It is the generic class for the canvas, it contains the values ​​of the number of views, canvas size, rows, columns, grid size...

  • Class DrawECGCanvas extends GenericCanvas
  • This class renders the data, both the grid and the view, it also contains the button events.

    Features

    • Improve canvas scrolling performance.

    Keywords

    FAQs

    Package last updated on 19 Nov 2024

    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