Skip to content

Java implementation of AZTEC algorithm for ECG compression and its evolutions

License

Notifications You must be signed in to change notification settings

luiz/aztec-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

What is this?

This is a collection of ECG (electrocardiogram) compressors based on the AZTEC algorithm: the AZTEC algorithm itself, published in this article, another that uses the modified AZTEC algorithm, published in this article, and another that uses the improved modified AZTEC algorithm, published in this article.

How do I use it?

You need to download the JAR (see “Downloads” tab above) and Apache’s Common CLI JAR, version 1.2, which can be found here. Put both the JARs in the same directory, then run


java -jar aztec-java-2.0.jar

to see a help message, which may guide you using it.

First, you need to specify the algorithm you want to use. For instance, if you want to use the AZTEC algorithm, you need to pass “AZTEC” as the first parameter in the command line. To see which parameters can be used for an algorithm, pass its name and the flag -h. For instance:


java -jar aztec-java-2.0.jar AZTEC -h

Let’s see an example. If you have a file with an ECG called “ecg.txt” and you want to compress it using the AZTEC algorithm, you can just run:


java -jar aztec-java-2.0.jar AZTEC -i ecg.txt -K 0.1

and the result will be printed in the console. The parameter -K is the compression level. It represents how big can be the difference between the signal and the output.

If you want to use another encoder, such as the modified AZTEC algorithm, you can do the following, as this algorithm has no mandatory arguments:


java -jar aztec-java-2.0.jar MAZTEC -i ecg.txt

If you want some ECG signals to test the algorithm, you can find some here.

How do I build it myself?

This project depends on Maven to compile the source code, run the tests and generate documentation and the JARs. Once you have Maven installed, it should be easy to get it building.

Can I reuse this code?

Sure! It’s licensed under Apache 2.0 license, which means that you can use, modify, copy and redistribute it as you wish, as long as you maintain the license and copyright notices in the code. You can use it either as a library for your own code or as a program.

About

Java implementation of AZTEC algorithm for ECG compression and its evolutions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages