python 的 ecg 心电图的图形怎么画出来的, base64 编码解码后,无图片,大家有研究的没有仪器是 MAC5000

2016-12-07 15:27:10 +08:00
 qile1

如题 原始文件如下

<?xml version="1.0" encoding="Windows-1252"?>
<!DOCTYPE RestingECG SYSTEM "restecg.dtd">
<RestingECG>
   <PatientDemographics>
      <PatientID></PatientID>
   </PatientDemographics>
   <TestDemographics>
      <DataType>Resting</DataType>
      <Site>1</Site>
      <AcquisitionDevice>MAC55</AcquisitionDevice>
      <Status>Unconfirmed</Status>
      <Priority>Normal</Priority>
      <AcquisitionTime>15:23:28</AcquisitionTime>
      <AcquisitionDate>09-26-2016</AcquisitionDate>
      <CartNumber>1</CartNumber>
      <AcquisitionSoftwareVersion>009D</AcquisitionSoftwareVersion>
      <XMLSourceVersion>MAC5000 v1.0</XMLSourceVersion>
   </TestDemographics>
   <RestingECGMeasurements>
      <VentricularRate>89</VentricularRate>
      <AtrialRate>89</AtrialRate>
      <PRInterval>150</PRInterval>
      <QRSDuration>80</QRSDuration>
      <QTInterval>340</QTInterval>
      <QTCorrected>413</QTCorrected>
      <PAxis>65</PAxis>
      <RAxis>44</RAxis>
      <TAxis>47</TAxis>
      <QRSCount>15</QRSCount>
      <QOnset>222</QOnset>
      <QOffset>262</QOffset>
      <POnset>147</POnset>
      <POffset>203</POffset>
      <TOffset>392</TOffset>
      <ECGSampleBase>500</ECGSampleBase>
      <ECGSampleExponent>0</ECGSampleExponent>
   </RestingECGMeasurements>
   <Diagnosis>
      <Modality>Resting</Modality>
         <StatementCount>3</StatementCount>
         <LabelText>12SL 诊断陈述</LabelText>
      <DiagnosisStatement>
         <StmtFlag>ENDSLINE</StmtFlag>
         <StmtText>窦性心律</StmtText>
      </DiagnosisStatement>
      <DiagnosisStatement>
         <StmtFlag>ENDSLINE</StmtFlag>
         <StmtText>QRS 低电压</StmtText>
      </DiagnosisStatement>
      <DiagnosisStatement>
         <StmtFlag>ENDSLINE</StmtFlag>
         <StmtText>临界 ECG</StmtText>
      </DiagnosisStatement>
   </Diagnosis>
   <Waveform>
      <WaveformType>Rhythm</WaveformType>
      <WaveformStartTime>0</WaveformStartTime>
      <NumberofLeads>8</NumberofLeads>
      <SampleType>CONTINUOUS_SAMPLES</SampleType>
      <SampleBase>500</SampleBase>
      <SampleExponent>0</SampleExponent>
      <HighPassFilter>16</HighPassFilter>
      <LowPassFilter>150</LowPassFilter>
      <ACFilter>50</ACFilter>
      <LeadData>
         <LeadByteCountTotal>10000</LeadByteCountTotal>
         <LeadTimeOffset>0</LeadTimeOffset>
         <LeadSampleCountTotal>5000</LeadSampleCountTotal>
         <LeadAmplitudeUnitsPerBit>4.88</LeadAmplitudeUnitsPerBit>
         <LeadAmplitudeUnits>μV</LeadAmplitudeUnits>
         <LeadHighLimit>2147483647</LeadHighLimit>
         <LeadLowLimit>268435456</LeadLowLimit>
         <LeadID>I</LeadID>
         <LeadOffsetFirstSample>0</LeadOffsetFirstSample>
         <FirstSampleBaseline>0</FirstSampleBaseline>
         <LeadSampleSize>2</LeadSampleSize>
         <LeadOff>FALSE</LeadOff>
         <BaselineSway>FALSE</BaselineSway>
         <ExcessiveACNoise>FALSE</ExcessiveACNoise>
         <MuscleNoise>TRUE</MuscleNoise>
         <LeadDataCRC32>2111414534</LeadDataCRC32>
         <WaveFormData>
RgBGAEYARgBIAEgASABIAEsATABNAE4ATgBOAE4ATgBQAFAAUABQAE0ATABLAEoARgBE
/6L/nv+f/5//mP+V/5f/nf+j/63/uv/D/8v/0v/b/+v//v8HAAIA+P/o/9T/u/+h/4v/
hP+D/4P/gf+B/4T/iv+K/4z/jP+P/5D/jv+R/5b/mP+a/57/n/+c/5n/mP+X/5b/l/+Y
/5n/mv+a/5v/nP+c/5v/m/+a/5j/mf+Y/5n/mv+a/5v/nf+d/53/nf+e/57/nv+e/57/
nf+d/w==
         </WaveFormData>
      </LeadData>
   </Waveform>
</RestingECG>

另外问下如何上传附件,有个 MAC5000 心电图仪器 XML 的说明书上传,我准备用 python 解码后画图试试,原始文件 xml 里面有好几个 WaveFormData 节点,是代表各个导联的图像吗?

我把原始数据和xml说明书放百度网盘了 http://pan.baidu.com/s/1skWSkXJ

4270 次点击
所在节点    程序员
4 条回复
warcraft1236
2016-12-07 16:52:21 +08:00
竟然看到了医疗行业的朋友
whitehamster
2016-12-07 20:48:16 +08:00
大体看了一下文档,
whitehamster
2016-12-07 20:50:41 +08:00
WaveFormData 中的数据应该是 ad 采集的原始数值,需要根据其他参数还原成电压数据,然后在坐标上画出
qile1
2016-12-07 23:27:51 +08:00
我以为是直接波形图,没那技术,还是放弃把,用现成的 ecg 程序可以分析和保存图像,太难

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/325932

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX