EGMclassifier is a MATLAB App Designer tool for viewing, annotating, and classifying electrograms (EGMs) from datasets stored in OpenEP .mat format.
The app allows the user to:
- load one or more OpenEP cases
- browse individual EGMs
- manually classify EGMs into user-defined classes
- add annotation markers by clicking on signals
- display waveform features such as WOI and activation time
- overlay different EGM duration detection methods
- save the labelled dataset for later use
- MATLAB
- App Designer support
- Input files in OpenEP .mat format
- Optional: a SubFunctions folder in the same directory for helper functions used by duration analysis
The app expects .mat files containing a userdata structure in OpenEP format.
At minimum, the loaded file should contain:
- userdata.electric.egm
Additional OpenEP fields are used when available, for example:
- userdata.electric.annotations.woi
- userdata.electric.annotations.referenceAnnot
- userdata.electric.annotations.mapAnnot
The app can also load a previously saved session file containing:
- EGMdata
Open MATLAB, navigate to the folder containing EGMclassifier.m, and run:
app = EGMclassifier;
This opens the graphical interface.
The app includes the following main features:
- Load one or more OpenEP .mat files
- Or load a previously saved labelled session
- Select a case from the case dropdown
- Select an individual EGM from the EGM dropdown
- Move through signals using next, previous, or random buttons
- Define up to 8 user classes
- Assign the current EGM to a class using the class buttons
- Optionally move automatically to the next or a random signal after classification
- Click directly on the plotted EGM to add annotation markers
- Choose annotation types such as:
- S1 Start / End
- S2 Start / End
- pacing spike
- local activation time
- fractionation
- far-field signal
- late potential
- double potential
- custom marker
- Set up a predefined sequence of annotation labels
- Step through repeated annotation workflows more quickly
- Delete sequence clicks if needed
Optional overlays include:
- Window of interest (WOI)
- Activation time
- Duration by deflection method
- Duration by nonlinear energy
- Duration by state machine
- Duration by sustained activity
- Duration by sliding standard deviation
The app can save the current labelled dataset as a .mat file containing:
- loaded case data
- assigned classes
- user annotations
- annotation settings
- duration settings
Saved session files contain the working dataset and settings so that annotation/classification can be resumed later.
- The default sampling frequency is set to 2000 Hz
- Files that do not match the expected OpenEP structure are ignored
- Some duration methods depend on helper functions in the SubFunctions folder