CN111820887A - Live electrocardiogram drawing method - Google Patents

Live electrocardiogram drawing method Download PDF

Info

Publication number
CN111820887A
CN111820887A CN201910301528.5A CN201910301528A CN111820887A CN 111820887 A CN111820887 A CN 111820887A CN 201910301528 A CN201910301528 A CN 201910301528A CN 111820887 A CN111820887 A CN 111820887A
Authority
CN
China
Prior art keywords
layer
electrocardiogram
waveform
information
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910301528.5A
Other languages
Chinese (zh)
Inventor
何正林
刘建江
尹彦琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201910301528.5A priority Critical patent/CN111820887A/en
Publication of CN111820887A publication Critical patent/CN111820887A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a live electrocardiogram drawing method, which comprises a background layer, an information display layer, an electrocardiogram wave-shape layer, a module for adjusting the dormancy time and the like. The background layer draws fixed and unchangeable information such as background grids, calibration voltage, lead names and the like; the information display layer is composed of a plurality of display components, each component displays single parameter information, and the parameter information is updated when the parameter value changes; the electrocardiographic waveform layer regularly refreshes each frame of electrocardiographic waveform and cursor; and the sleep time adjusting module dynamically adjusts the current sleep time according to the information display layer and the time consumed for drawing the current electrocardiographic waveform frame. The method updates the information and the electrocardiographic waveform of the minimum area each time, improves the drawing efficiency and ensures that the electrocardiographic playing is smooth and fluent.

Description

Live electrocardiogram drawing method
Technical Field
The invention relates to a medical auxiliary instrument, in particular to a direct-broadcast electrocardiogram drawing method.
Background
At present, on equipment such as a fixed electrocardiogram machine, a handheld electrocardiogram machine, an electrocardiogram machine workstation and the like and remote monitoring related software, a displayed real-time electrocardiogram almost has no background grid, or the background grid, the electrocardiogram and parameter information are redrawn every frame. These schemes require a large amount of CPU computation, and in order to balance system performance, trade-offs must be made in the aspects of display information, delay degree, play fluency, display sampling rate, and the like.
Disclosure of Invention
In order to solve the problems, the invention provides a live electrocardiogram drawing method, which updates the information and waveform of the minimum area every time, improves the drawing efficiency and ensures that the electrocardiogram is played very smoothly.
The invention provides a live electrocardiogram drawing method, which is characterized by comprising the following steps: the device comprises a background layer, an information display layer, an electrocardiographic waveform layer, a sleep time adjusting module and the like. The electrocardiogram is drawn on a background picture layer, an information display picture layer and an electrocardiogram waveform picture layer; according to the characteristic of the updating frequency of all electrocardiogram drawing information, drawing information with similar frequency on the same map layer; the background layer is arranged at the bottommost layer, and after a program is started, fixed and unchangeable information such as a background grid, a calibration voltage, a lead name and the like is drawn according to the size of a waveform display window; the information display layer is arranged in the middle layer, draws parameter information with low updating frequency and consists of a plurality of display components, each component displays single parameter information, and the parameter information is updated when the parameter value changes; the electrocardiographic waveform layer is arranged on the topmost layer, and each frame of electrocardiographic waveform and cursor are refreshed at regular time; and the sleep time adjusting module dynamically adjusts the current sleep time according to the information display layer and the time consumed for drawing the current electrocardiographic waveform frame.
The invention is characterized in that a background layer is arranged at the bottommost layer, and fixed and unchangeable information is drawn on the background layer, and the method comprises the following specific implementation steps:
drawing a background grid on the whole window according to the width scrWidth, the height scrHeight, the screen DPI and the electrocardiogram sampling rate sampleRate of the waveform display window;
determining the display transverse position X (i) = scrWidth/(i +1) and the longitudinal position Y (j) = (2 x j +1) scrHeight/(2 x LeadNum) of each lead according to the height of the waveform display window, wherein i is the split screen number, j is the serial number of the current split screen lead based on the index of 0, and j is the serial number of the current split screen lead based on the index of 0;
plotting the scaled voltage at the longitudinal and lateral positions of each lead;
the lead name is displayed below the lead scaling voltage.
The invention is characterized in that the information display layer is arranged in the middle layer, the parameter information with lower updating frequency is drawn on the layer and consists of a plurality of display components, each component displays single parameter information, the display position and the display size of the parameter information are reasonably distributed according to the size of a waveform display window, the parameter values are updated when being changed, and a plurality of information display layers can be absent or exist according to the quantity of the parameters and the characteristic of updating frequency.
The invention is characterized in that an electrocardiographic waveform layer is arranged at the topmost layer, each electrocardiographic waveform and a cursor are refreshed on the layer at regular time, and the specific implementation steps are as follows:
defining a refresh frame frequency f per second, and taking a value range (0,1000);
calculating the number num = f sampleRate/1000 of each frame of electrocardiogram data of each lead;
calculating the width fWidth = wWidth + sWidth of the transverse refreshing area of the current frame, wherein wWidth is the fixed waveform refreshing width, and sWidth is the cursor width;
erasing a rectangular area (x0(i), 0, x0(i) + fWidth, scrHeight) with a transparent brush, wherein i is the number of split screens, and x0 is the end position of one frame waveform on the current split screen based on the index of 0;
each lead draws each frame of electrocardiographic waveform in a rectangular region (x0(i), 0, x0(i) + wWidth, scrHeight) based on the last waveform end position (x (j), y (j)), where i is the number of split screens and x0 is the end position of the frame of waveform currently on the split screen based on the index of 0.
The invention is characterized in that the sleep time adjusting module dynamically adjusts the current sleep time according to the time consumed by the information display layer and the current electrocardiogram waveform frame drawing, and the sleep time calculating step is as follows:
calculating ideal interval time interval = f/1000 of each frame of electrocardiogram;
calculating updating parameters and time eslpsed = timestamp1-timestamp2 consumed by drawing the current frame electrocardiogram, wherein the timestamp1 is a timestamp for starting drawing, and the timestamp2 is a timestamp for ending drawing;
the sleep time sleeplnterval = interval-eslpsed is calculated.
Drawings
Fig. 1 is a flow chart of a live electrocardiogram drawing method according to an embodiment of the present invention.
FIG. 2 is a schematic diagram of a diagram layer according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating a background layer according to an embodiment of the invention.
Fig. 4 is a schematic diagram of an information display layer according to an embodiment of the invention.
Fig. 5 is a schematic diagram of an electrocardiographic waveform layer according to an embodiment of the present invention.
FIG. 6 is a diagram of an electrocardiographic waveform frame according to an embodiment of the present invention.
FIG. 7 is a schematic electrocardiogram of an embodiment of the present invention.
Detailed description of the invention
The following detailed description of embodiments of the invention refers to the accompanying drawings.
According to an embodiment of the present invention, a live electrocardiogram drawing method is described by taking development based on C + + programming language as an example, however, it should be understood by those skilled in the art that the application of the present invention is not limited to C + + programming voice, and other programming voices (including but not limited to C #, VB, QT, Android, Objective-C, PHP, python, HTML5, etc.) can be applied to the present invention.
Fig. 1 is a flow chart of a live electrocardiogram rendering method according to an embodiment of the present invention. The flow chart includes drawing a background grid 100 in a background layer according to the waveform display window size; determining the display longitudinal and transverse positions of each lead according to the height of a waveform display window, and drawing a scaling voltage and a lead name on a background layer 101; reasonably arranging the parameter positions and determining the display size according to the size of the waveform display window, and displaying each parameter information 102 on the information display layer; quitting the playing judgment module 103; a parameter change judgment module 104; updating the changed parameters 105 on the information display layer; refreshing the electrocardiogram waveform and the cursor 106 of the current frame according to the position of each lead on the electrocardiogram waveform layer; the sleep time is calculated and adjusted and the drawing thread goes to sleep 107.
After the program is started, three layers are defined, as shown in fig. 2, a background layer 200 is at the bottommost layer, and fixed and unchangeable information is drawn on the layer; the information display layer 201 is arranged in the middle layer, and the parameter information with lower updating frequency is drawn on the layer; the electrocardiographic waveform layer 202 is at the top, and each frame of electrocardiographic waveform and cursor is periodically refreshed on this layer.
Background layer background grid 300 in fig. 3 is drawn on background layer 200 according to the width scrWidth, height scrHeight, screen DPI and electrocardiogram sampling rate sampleRate of the waveform display window; the display positions 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, and 312 of each lead in fig. 3 are determined by the waveform display window height as the horizontal position x (i) = scrWidth/(i +1), and the vertical position y (j) = (2 × j +1) schreheight/(2 × LeadNum), where i is the number of split screens, based on the index of 0, j is the current split screen lead number, based on the index of 0; plotting the scaled voltages at the display locations 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, and 312 of each lead in FIG. 3; 4) the lead names are displayed below the lead scaling voltages, see 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, and 324 in FIG. 3.
An exit play judging module 103 is arranged at the entrance of the timing execution program, and if the electrocardiogram drawing is required to exit, the electrocardiogram drawing task exits; if the electrocardiograph is not to be exited, the parameter change determination module 104 is entered.
The parameter change judging module 104 analyzes whether the parameter value changes, and if the parameter value changes, the information layer 201 is entered to update the parameter information 105; if no parameter value changes, the current electrocardiographic waveform and the cursor 106 are drawn in the electrocardiographic waveform layer 202.
The information layer 201 updates the parameter information 105 and if the current heart rate 400 has a number, it is updated in real time, as shown in fig. 4.
The electrocardiographic waveform layer 202 draws the current frame electrocardiographic waveform and the cursor 106, and as shown in fig. 5, first defines a refresh frame frequency f per second to take a value range (0,1000), calculates the number num = f sampleRate/1000 of electrocardiographic data per frame per lead, calculates the width fWidth = wWidth + sfidth of the current frame transverse refresh area 500, where wWidth is a fixed waveform refresh width 501 and sfidth is a cursor width 502, and then erases a rectangular area (x0(i), 0, x0(i) + fWidth, scrHeight) with a transparent brush, where i is the number of divided screens, based on an index of 0, and x0 is the end position of a waveform of the frame on the current divided screen, each lead is based on the last waveform end position (x (j), y (j), draws the rectangular area (x0(i), 0, x0(i) + wddth, scrHeight) on the number of divided screens, where x is the number of divided screens, and the number of divided screens is 0, and where x0 is the number of divided screens, the remaining space area of sfidth serves as a cursor 502; after all the layers are drawn, the effect shown in fig. 7 is finally formed.
The sleep time adjusting module dynamically adjusts the current sleep time 107 according to the time consumed by the information display layer and the current electrocardiographic waveform frame drawing, and the sleep time calculating step is as follows: calculating ideal interval time interval = f/1000 of each frame of electrocardiogram; calculating updating parameters and time eslpsed = timestamp1-timestamp2 consumed by drawing the current frame electrocardiogram, wherein the timestamp1 is a timestamp for starting drawing, and the timestamp2 is a timestamp for ending drawing; calculating sleep time sleepInterval = interval-eslpsed; and finally setting the sleep time of the drawing thread.

Claims (5)

1. A live electrocardiogram drawing method is characterized by comprising the following steps:
the electrocardiogram is drawn on a background map layer, an information display map layer and an electrocardiogram waveform map layer, and according to the characteristic of respective update frequency of all electrocardiogram drawing information, information with similar frequency is drawn on the same map layer;
the background layer is arranged at the bottommost layer, and after a program is started, fixed and unchangeable information such as a background grid, a calibration voltage, a lead name and the like is drawn according to the size of a waveform display window;
the information display layer is arranged in the middle layer, the parameter information with lower updating frequency is drawn, the information display layer is composed of a plurality of display components, each component displays single parameter information, the parameter values are updated when changed, and a plurality of information display layers can be absent or exist according to the quantity of the parameters and the characteristic of the updating frequency;
the electrocardiographic waveform layer is arranged on the topmost layer, and each frame of electrocardiographic waveform and cursor are refreshed at regular time;
and the sleep time adjusting module dynamically adjusts the current sleep time according to the information display layer and the time consumed for drawing the current electrocardiographic waveform frame.
2. The direct electrocardiogram drawing method of claim 1, wherein: the background layer is arranged at the bottommost layer, and fixed and unchangeable information is drawn on the background layer, and the method is concretely implemented by the following steps:
1) drawing a background grid on the whole window according to the width scrWidth, the height scrHeight, the screen DPI and the electrocardiogram sampling rate sampleRate of the waveform display window;
2) determining the display transverse position X (i) = scrWidth/(i +1) and the longitudinal position Y (j) = (2 x j +1) scrHeight/(2 x LeadNum) of each lead according to the height of the waveform display window, wherein i is the split screen number, j is the serial number of the current split screen lead based on the index of 0, and j is the serial number of the current split screen lead based on the index of 0;
3) plotting the scaled voltage at the longitudinal and lateral positions of each lead;
4) the lead name is displayed below the lead scaling voltage.
3. The direct electrocardiogram drawing method of claim 1, wherein: the information display layer is arranged in the middle layer, the parameter information with low updating frequency is drawn on the layer and consists of a plurality of display components, each component displays single parameter information, the display positions and the display sizes of the parameter information are reasonably distributed according to the size of the waveform display window, the parameter values are updated when changed, and a plurality of information display layers can be absent or exist according to the quantity of the parameters and the characteristic of updating frequency.
4. The direct electrocardiogram drawing method of claim 1, wherein: the electrocardiographic waveform layer is arranged on the topmost layer, each electrocardiographic waveform and each cursor are refreshed on the layer at regular time, and the specific implementation steps are as follows:
1) defining a refresh frame frequency f per second, and taking a value range (0,1000);
2) calculating the number num = f sampleRate/1000 of each frame of electrocardiogram data of each lead;
3) calculating the width fWidth = wWidth + sWidth of the transverse refreshing area of the current frame, wherein wWidth is the fixed waveform refreshing width, and sWidth is the cursor width;
4) erasing a rectangular area (x0(i), 0, x0(i) + fWidth, scrHeight) with a transparent brush, wherein i is the number of split screens, and x0 is the end position of one frame waveform on the current split screen based on the index of 0;
5) each lead draws each frame of electrocardiographic waveform in a rectangular region (x0(i), 0, x0(i) + wWidth, scrHeight) based on the last waveform end position (x (j), y (j)), where i is the number of split screens and x0 is the end position of the frame of waveform currently on the split screen based on the index of 0.
5. The direct electrocardiogram drawing method of claim 1, wherein: the sleep time adjusting module dynamically adjusts the current sleep time according to the time consumed by the information display layer and the current electrocardiographic waveform frame drawing, and the sleep time calculating step is as follows:
1) calculating ideal interval time interval = f/1000 of each frame of electrocardiogram;
2) calculating updating parameters and time eslpsed = timestamp1-timestamp2 consumed by drawing the current frame electrocardiogram, wherein the timestamp1 is a timestamp for starting drawing, and the timestamp2 is a timestamp for ending drawing;
3) the sleep time sleeplnterval = interval-eslpsed is calculated.
CN201910301528.5A 2019-04-16 2019-04-16 Live electrocardiogram drawing method Pending CN111820887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910301528.5A CN111820887A (en) 2019-04-16 2019-04-16 Live electrocardiogram drawing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910301528.5A CN111820887A (en) 2019-04-16 2019-04-16 Live electrocardiogram drawing method

Publications (1)

Publication Number Publication Date
CN111820887A true CN111820887A (en) 2020-10-27

Family

ID=72915691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910301528.5A Pending CN111820887A (en) 2019-04-16 2019-04-16 Live electrocardiogram drawing method

Country Status (1)

Country Link
CN (1) CN111820887A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152385A (en) * 2023-04-21 2023-05-23 索思(苏州)医疗科技有限公司 Physiological signal drawing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152385A (en) * 2023-04-21 2023-05-23 索思(苏州)医疗科技有限公司 Physiological signal drawing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10885876B2 (en) Method and device for adjusting brightness, display device and storage medium
JP7317538B2 (en) Liquid crystal display device and its driving method
US7924283B1 (en) Time relevance-based visualization of data
CN101281302B (en) Method and apparatus for compensating for display defect of flat panel display
US4780709A (en) Display processor
US9171507B2 (en) Controller for updating pixels in an electronic paper display
US20120023449A1 (en) System and method for an interactive filter
US10169890B1 (en) Animated transistions between graphs
KR20140060990A (en) Display device and method for compensating data charging deviation thereof
CN111820887A (en) Live electrocardiogram drawing method
US10339898B2 (en) Image display device, the image display system, and image display method
CN104517559B (en) display sub-pixel driving system and driving method thereof
JP5556201B2 (en) Display device
CN109033056A (en) A kind of page self-adapted paging form realization method and system
CN102479176A (en) Fast-approaching typesetting method and device of electronic reader
EP3855719A1 (en) Image display method and apparatus, and smart television and readable storage medium
US9489361B2 (en) Image processing device, image processing device control method, program, and information storage medium
CN107340886B (en) Soft keyboard state determination method, device, medium and terminal
CN100583224C (en) Electro-optical device, drive method for electro-optical device, and electronic apparatus
US20020175916A1 (en) Method for presenting circular dialog windows
JP5507222B2 (en) Display device, sensor device, display screen display method, and display screen display program
JP4599049B2 (en) Display device and portable device using the same
US20100271387A1 (en) Method and display device for displaying characters
US8064567B2 (en) Method and device for the incremention of counter statuses stored in memory cells of a memory
CN115214360A (en) Vehicle oil consumption display method and device, controller and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201027

WD01 Invention patent application deemed withdrawn after publication