Reading the ECG data

Hi,
Is it possible to read the heart phase from the ECG pulse engine? The ECG is in fact a loop of the PQRSTU wave, so what I need is to know the time in loop, like percentage of the current heart cycle, where 0% would be a systolic beginning and 50% is a half loop and so on…


Thanks in advance!

Based on the image provided,
You might be able to get Pressures, volumes and flow information from various locations on the body associated with the text on the right of your image

Currently, Pulse only has a 2 chamber heart model, and Pulse is a 0D lumped parameter model for the whold body, so it might not have the level of detail you need

Here is the list of the anatomy compartments you can pull from Pulse
https://gitlab.kitware.com/physiology/engine/-/blob/4.x/src/cpp/engine/PulseEngine.h#L360

You can view compartment data via the Pulse explorer
https://gitlab.kitware.com/physiology/explorer/-/wikis/home#download-the-pulse-explorer

  1. Load a state
  2. Start the Engine
  3. Goto the Data Request Tab
  4. Click the New Plot Set button onthe bottom right
  5. Choose, Anatomy, Vasculature, and so on
  6. Click Create

Here is the Left Heart Pressure

You can use the + or - button to add plots in that window
Or New Plot Set again to create another plot view to view plot windows side by side

There are also other clinical fields you can get from Pulse
https://pulse.kitware.com/_c_d_m_tables.html#CardiovascularSystemTable

If there is a field you would like us to add, we might be able to do
(Assuming we can easily pull the base data from pulse)

You can also get into the detials of the data using our API and poll data form the compartments within your own monitoring code. You can listen for events to notify you when the cardiac cycle starts, so you can collect and sort data per cardiac cycle as the engine is running.

Again, the detail of wavefoms based on Pulse data may be too coarse compared to your provided image.
We might not have those small dips where valves open/close
And our 2 Chamber nature might not provide some other detailed pressure/volume changes in the cardiac cycle

Hope that helps!

1 Like

Thank you for your extensive answer!
However, I might mislead you with the graphic, I’m sorry for that.
What I really need is related to this part:

You can listen for events to notify you when the cardiac cycle starts

So the event would be fired on the heart cycle start, am I right? Now, knowing the heart rate, I can assume other heart phases in time.

I’m using Unity, so I believe it is not too complicated.

Thank you again, that looks like good clue!

Yah
the StartOfCardiacCycle is an SEEvent
Look at this example, and instead of checking for death
Check for the cycle start

https://gitlab.kitware.com/physiology/engine/-/blob/4.x/src/csharp/howto/HowTo_DeathState.cs

Note the provided Heart Rate is for the previous, completed cardiac cycle
the actual ‘now’ cardiac cycle is based on a heart rate that is computed at the start of the cardiac cycle, but the actual mechanics/length of the ‘now’ cycle can vary in time based on system feedback (like barroreceptors)

So while you do have an idea of the ‘now’ heart rate, you don’t actually know how long the current cycle will take, while that cycle is executing…

Does that make sense?

Yes, I have figured that out, but thanks for making me event more sure about it! :slight_smile:

I have to test how that small uncertainty influences our simulator. Maybe I could implement a one-cycle delay in processing to be sure I’m syncing correctly. I am eager to test that too.

I need to say this is a truly amazing piece of software! Thank you!