Together with the cornerstone library, this project allows reading and drawing ECGs from a dcm in web version.
npm install ecg-dicom-web-viewerdependencies:
js
// To install the newest version
npm install --save ecg-dicom-web-viewer
`
Example
1. Once installed import the project.
`js
// Import
import {
ReadECG, //Optional.
SOP_CLASS_UIDS, //Optional.
WAVE_FORM_BITS_STORED, //Optional.
KEY_UNIT_INFO, //Optional.
SPLINE, //Optional.
DicomECGViewer, //Principal.
} from "ecg-dicom-web-viewer";
`
2. Instantiate the new class with the necessary data and create the view.
`js
//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.
``
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.
Main method, draws the canvas and its entire view.
Receives a dataSet data structure and returns a readable array.
optsspeed: 25, amplitude: 10, applyLowPassFilter: true
Read the arraydicombuffer and return legible data.
Read the arraydicombuffer and return information data, example: BPM, Name, Duration ECG...
SOP_CLASS_UIDS - SOP UID of ECG types and graph measurements.
WAVE_FORM_BITS_STORED - Accuracy and quality of the recorded signal.
KEY_UNIT_INFO - These are the data to be displayed/read from the ECG. Example: QTC INTERVAL, QRS AXIS, P DURATION etc...
SPLINE - Generates interpolation in the ECG view with a spline, enabled by default, may affect performance.
It is the generic class for the canvas, it contains the values of the number of views, canvas size, rows, columns, grid size...
This class renders the data, both the grid and the view, it also contains the button events.