Skip to content
Christopher edited this page Aug 16, 2014 · 1 revision

How to use the jsierraecg Library

Introduction

Using the jsierraecg Java Library requires little effort on the part of the programmer. Currently two main strategies for working with Sierra ECG XML files are provided:

  • Preprocessing the file to remove XLI compression
  • Extracting the data for each of the leads stored

Processing Sierra ECG XML Files

You can process a Sierra ECG XML file to remove XLI compression in two ways:

  • Preprocess the input file and save it immediately to an output file

    import java.io.File;
    import org.sierraecg.SierraEcgFiles;
    
    SierraEcgFiles.transform(new File("input.xml"), new File("output.xml"));
  • Process the input file and use the resulting lead data

    import java.io.File;
    import org.sierraecg.SierraEcgFiles;
    import org.sierraecg.DecodedLead;
    
    DecodedLead[] = SierraEcgFiles.transform(new File("a.xml"), new File("b.xml"));

Extracting Lead Data

Extracting lead data from a Sierra ECG XML file is commonly done like so:

import java.io.File;
import org.sierraecg.DecodedLead;
import org.sierraecg.SierraEcgFiles;

DecodedLead[] leads = SierraEcgFiles.extractLeads(new File("input.xml"));