https://github.com/oclay1st/wfdb
Java WFDB Library
https://github.com/oclay1st/wfdb
ecg ekg physionet wfdb
Last synced: 7 months ago
JSON representation
Java WFDB Library
- Host: GitHub
- URL: https://github.com/oclay1st/wfdb
- Owner: oclay1st
- License: apache-2.0
- Created: 2024-01-27T03:53:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-21T00:37:30.000Z (over 1 year ago)
- Last Synced: 2025-01-21T06:26:51.645Z (9 months ago)
- Topics: ecg, ekg, physionet, wfdb
- Language: Java
- Homepage:
- Size: 942 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://central.sonatype.com/artifact/io.github.oclay1st/wfdb)
[](https://sonarcloud.io/summary/new_code?id=oclay1st_WFDB)
[](https://sonarcloud.io/summary/new_code?id=oclay1st_WFDB)
[](https://sonarcloud.io/summary/new_code?id=oclay1st_WFDB)
# Java WFDB Library
This library is a pure Java implementation of the Waveform Database(WFDB) [specifications](https://github.com/wfdb/wfdb-spec).
## What is WFDB?
[Waveform Database (WFDB)](https://wfdb.io) is a set of file standards designed for reading and storing physiologic signal data, and associated annotations backed by MIT-LCP members.
## Features:
- [x] Parse single-segment and multi-segment records
- [x] Support for signal format: 8, 16, 24, 32, 61, 80, 160, 212, 310, 311
- [x] Support for different signal formats and files
- [x] Filter by a range of time
- [x] Filter by signals indices
- [x] Export single-segment and multi-segment records
## Usage
Parse a single-segment record:
```
Path path = Path.of(...);
SingleSegementRecord record = SingleSegmentRecord.parse(path);
```
Parse and filter a single-segment record by time:
```
Path path = Path.of(...);
long start = 0; // 0 millisecond
long end = 1000; // first second
Filter filter = new Filter.Builder().startTime(start).endTime(end).build();
SingleSegementRecord record = SingleSegmentRecord.parse(path, filter);
```
Parse and filter a single-segment record by signal indices:
```
Path path = Path.of(...);
Filter filter = new Filter.Builder().signals(new int[]{0, 1, 2}).build();
SingleSegementRecord record = SingleSegmentRecord.parse(path, filter);
```
Parse a multi-segment record:
```
Path path = Path.of(...);
MultiSegmentRecord record = MultiSegmentRecord.parse(path);
```
Export a single-segment record:
```
...
SingleSegmentRecord record = SingleSegmentRecord.parse(path, filter);
Path exportPath = Path.of(...);
record.export(exportPath);
```
## Contributing
Checkout for the missing features and feel free to open a issue and create a PR if you find something wrong.