|
||||||||||||||||||||
3 Remarks/Hints and Recommendations regarding SCP Formatting and CompressionBasically, it is assumed that the specification of the main document regarding formatting an SCP ECG record are met. This includes: a) The CRC and record length information are given. b) Section 0 (Pointers) is correctly given. c) Section 1 (Header information) is correctly given. d) And evtl. subsequent optional sections are appropriately filled. 3.1 Formatting options for the ECG dataThere are principally four options for formatting the ECG data. 3.1.1 Uncompressed Raw DataThe ECG raw data need not be compressed. To comply with the specifications of section 3 clause 5.6 the simultaneously lead sample arrays need to be reorganized in such a way that the leads are ordered sequentially. 3.1.2 Lossless redundancy reductionThe ECG may be lossless compressed by redundancy reduction, e.g. using first or second order sample differences. The table contains the control information of byte 5 in SCP sections 5 and 6.
The text of the standard main document does allow that section 2 (Huffman table specifications) is not included. The data have to be ordered in such a way that the leads follow sequentially one after the other. 3.1.3 Lossless redundancy reduction with Huffman encodingIn this case section 2 must be introduced into the SCP record. There are a couple of options for using different Huffman tables. a) A default table as specified in Annex C may be used. b) One or more manufacturer specific tables may be specified and used. These tables have to be included in section 2. Within the first two bytes of section 2 control information is provided about which of the options is applied. Please note: During the development of the SCP compression, it turned out that the use of signal statistic specific Huffman tables do not provide significantly different compression performance for a set of 100 ECGs from the CSE database. Therefore use of the default table is recommended. Example of storing redundancy reduced ECG data with Huffman encodingSince original ECG raw data shall be stored no ECG data analysis is necessary. Typically the compression ratio obtained is 3-4. For this case of SCP compression the default SCP Huffman table is used (as defined in clause C.2.7.4 in the SCP document) in SCP section 2. The data part of SCP section 2 should be filled like this:
The default Huffman table is shown below (see clause C.2.7.4):
The lead sequentially compressed ECG raw data have to be stored in section 6 (called Rhythm data). See a numerical example for Huffman encoding: The data: 1, 2, -1, 0, 3, 0, 4, 1, 0, -2, 0, 15, -1, 0, 13, 0, 1, -2, -1, 1 should be encoded using the default Huffman table. This results in the data shown in the following table:
The resulting bit stream is: 10011001010111000111100100011010111111111000001111 101011111111100000110101001101101100 Note and RecommendationThis method of compression should be applied if e.g. for research purposes or when, in case of rhythm abnormalities, the original ECG raw data record shall be restorated.
3.1.4 SCP ECG High Compression (lossy)For ECG high compression ECG data analysis is necessary. From the ECG data a reference beat needs to be computed and pointers for localization and beat typing information have to be derived. Without the SCP overhead information compression ratio for the ECG data of up to 25 may be obtained. Typically a complete high compressed record has a length of 6 to 8 kBytes. Note: This method still allows for reproduction of identical measurements, if the compression algorithm is correctly applied! For an easier understanding the illustrations of the high compression method are given below again: Original ECG - "raw data"a) Locate a reference point inside all ECG complexes, e.g. the time of QRSmax or any other marker ==> Fiducials for Reference Beat subtraction (see fc1 to fc7 in figure below) b) Identify ECG complex types, i.e. normal type, different extrasystoles ==> QRS-type 0, 1, etc.
Figure 1 - Example of raw data, fiducials and QRS typing. a) Compute the "Reference Beat Type 0", e.g. representative Average Cycle, Median Cycle, Modal Beat, ... b) Identify the wave onsets and offsets of the Reference Beat 0 ==> length of the Reference Beat 0 to be subtracted ==> pointers for QRS data segments p (see figures 3, 4) to be protected from filtering and decimation.
Figure 2 - Example of a reference beat. Subtract the Reference Beat Type 0 from all ECG complexes of type 0 using the fiducial locations
Figure 3 - Example of a residual record.
Figure 4 - Example of residual data compression. The second successive differences are then Huffman encoded, see numerical example in Annex C of the standard. Minimum requirements for ECG data encoding and compression Because this method of storing ECG data into SCP is not lossless, differences between original ECG data and the reconstructed ECG data (after decompression) may occur. The following minimum requirements for data acquisition must be met:
During development of the standard it was desired by the manufacturers that other compression methods might be applied. On the other hand for data storage and retrieval (e.g. serial comparison) it was agreed that reconstructed data should meet minimum requirements as listed below: Minimum Requirements for error tolerances of reconstructed ECGs(see clause 6.5.2 and note 1 of the main document)
3.2 A few practical hints from the implementation of the high compressionIn the past there have been two frequent problems during SCP compression/decompression:
The problem of transient errors at the boundaries of reference beat subtraction has been discussed during a revision of the SCP standard by the AAMI working group. The results of this discussion are three methods of minimizing the effect of transients at the boundaries of the subtraction zones: a) During the compression Place SB(k) so that the interval QB(k)-SB(k) between SB(k) and QB(k) is a multiple of the decimation factor. Place SE(k) so that the interval SE(k)-QE(k) between QE(k) and SE(k) is a multiple of the decimation factor. This method is recommended in (informative) Annex C.2.5 of the SCP standard. b) During the compression When forming the reference beat type 0, remove the data offset from reference beat type 0 by setting QRS onset to zero offset. This will reduce the amplitude offset of the step after subtracting the reference beat. The effect of this method is much larger at the start subtraction boundary than at the end subtraction boundary, because the start subtraction boundary is located nearer to QRS onset than the end subtraction boundary. This method is recommended in (informative) Annex C.2.5 of the SCP standard. c) During the filtering After subtraction of reference beat type 0, there can be steps in the residual data at the boundaries of the subtraction zones, SB(k) and SE(k). These steps must not be filtered, so that it is possible to reproduce them in the reconstituted residual data. This method is recommended in (informative) Annex C.2.4.3 of the SCP standard. d) During the decompression During interpolation, two cases should be handled differently:
Method a), b) and c) are included within the SCP informative part ANNEX C of the standard, while method d) is a practical solutions of that problem. All four methods (or a combination of these three) may be implemented to reduce the transient errors after decompression. 3.2.2 Pointers to the protected data segmentFor correction of clause C.2.4.2 in the SCP standard document the equations: QB(k) = QRSonset (k) - e1 QE(k) = QRSoffset(k) + e2 should be replaced by the equations: QB(k) = QRSonset (k) - eB(k) QE(k) = QRSoffset(k) + eE(k) Specifying that QB(k) can be reduced of a quantity eB(k) (from 0 to decimation factor - 1) to take into account the need of maintaining the previous non protected interval as a multiple of the decimation factor. Moreover the last QE(k) can be increased of a quantity eE(k) (from 0 to decimation factor - 1) to take into account the need of maintaining the last non protected interval as a multiple of the decimation factor. The fiducials eB(k) or eE(k) may additionally be decreased or increased by a multiple of the decimation factor due to a "safety margin" for possible errors in locating QRS onset and QRS offset. The reason for this change is that eB(k) and eE(k) may differ from QRS to QRS, while e1 and e2 are fixed constants.
|
||||||||||||||||||||
All comments to the webmaster |
![]() |
|||||||||||||||||||