ecg-dicom-web-viewer
This library allows viewing an ECG file in DICOM format in web view.
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
:
npm install --save ecg-dicom-web-viewer
Example
- Once installed import the project.
import {
ReadECGData,
Constants,
DicomECGViewer,
} from "ecg-dicom-web-viewer";
- Instantiate the new class with the necessary data and create the view.
let viewer = new DicomECGViewer(
byteArray,
divView,
viewportIndex
);
viewer.loadCanvas();
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 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 ReadECGData
- readData(dataSet)
Receives a dataSet data structure and returns a readable array.
- getDataSet(dataDICOMarrayBuffer)
Read the arraydicombuffer and return dataSet.
Static Constants
SOP UID of ECG types and graph measurements.
ECG references, maximum and minimum amplitudes.
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
- Display more information such as beats per minute.
- Improve canvas scrolling performance.
- Support SOP AmbulatoryECGWaveformStorage.