コード例 #1
0
ファイル: RxboxEngine.py プロジェクト: hamalawy/telehealth
    def __init__(self, parent, ECGSimulated, ECGData, *args, **kwds):
        """ initializes the placement of the plotter to the 12 lead dialog window

        Parameters
        ----------
        parent  :  the main window which calls the creation of the dialog window

        """
        Lead12Dialog.__init__(self, *args, **kwds)
        self.parent = parent
        parent = self
        sizersize = self.leadI_sizer.GetSize()
        bigsizer = self.leadII_sizer.GetSize()
        
        self.plotter_I = wx.Panel(parent)
        self.plotter_II = wx.Panel(parent)
        self.plotter_III = wx.Panel(parent)
        self.plotter_aVR = wx.Panel(parent)
        self.plotter_aVL = wx.Panel(parent)
        self.plotter_aVF = wx.Panel(parent)
        self.plotter_V1 = wx.Panel(parent)
        self.plotter_V2 = wx.Panel(parent)
        self.plotter_V3 = wx.Panel(parent)
        self.plotter_V4 = wx.Panel(parent)
        self.plotter_V5 = wx.Panel(parent)
        self.plotter_V6 = wx.Panel(parent)
        self.plotter_bigII = wx.Panel(parent)
        
        self.leadI_sizer.Add(self.plotter_I, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.small_leadII_sizer.Add(self.plotter_II, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.leadIII_sizer.Add(self.plotter_III, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.aVR_sizer.Add(self.plotter_aVR, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.aVL_sizer.Add(self.plotter_aVL, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.aVF_sizer.Add(self.plotter_aVF, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.V1_sizer.Add(self.plotter_V1, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.V2_sizer.Add(self.plotter_V2, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.V3_sizer.Add(self.plotter_V3, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.V4_sizer.Add(self.plotter_V4, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.V5_sizer.Add(self.plotter_V5, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        self.V6_sizer.Add(self.plotter_V6, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
        
        self.leadII_sizer.Add(self.plotter_bigII, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 4)
コード例 #2
0
ファイル: rxboxGUIDemo.py プロジェクト: hamalawy/telehealth
    def __init__(self, parent, *args, **kwds):
        """ initializes the placement of the plotter to the 12 lead dialog window

        Parameters
        ----------
        parent  :  the main window which calls the creation of the dialog window

        """
        
        Lead12Dialog.__init__(self, *args, **kwds)
        self.parent=parent
        sizersize = self.leadI_sizer.GetSize()
        print sizersize
        bigsizer = self.leadII_sizer.GetSize()
        print bigsizer
        self.plotter_I=Plotter(self,(308,162))
        self.plotter_II=Plotter(self,(308,162))
        self.plotter_III=Plotter(self,(308,162))
        self.plotter_aVR=Plotter(self,(308,162))
        self.plotter_aVL=Plotter(self,(308,162))
        self.plotter_aVF=Plotter(self,(308,162))
        self.plotter_V1=Plotter(self,(308,162))
        self.plotter_V2=Plotter(self,(308,162))
        self.plotter_V3=Plotter(self,(308,162))
        self.plotter_V4=Plotter(self,(308,162))
        self.plotter_V5=Plotter(self,(308,162))
        self.plotter_V6=Plotter(self,(308,162))
        
        self.leadI_sizer.Add(self.plotter_I.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.small_leadII_sizer.Add(self.plotter_II.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.leadIII_sizer.Add(self.plotter_III.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.aVR_sizer.Add(self.plotter_aVR.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.aVL_sizer.Add(self.plotter_aVL.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.aVF_sizer.Add(self.plotter_aVF.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.V1_sizer.Add(self.plotter_V1.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.V2_sizer.Add(self.plotter_V2.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.V3_sizer.Add(self.plotter_V3.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.V4_sizer.Add(self.plotter_V4.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.V5_sizer.Add(self.plotter_V5.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.V6_sizer.Add(self.plotter_V6.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)

##        self.plotter_I.plot(self.parent.getlead[0])
##        self.plotter_II.plot(self.parent.getlead[1])
##        self.plotter_III.plot(self.parent.getlead[2])
##        self.plotter_aVR.plot(self.parent.getlead[3])
##        self.plotter_aVL.plot(self.parent.getlead[4])
##        self.plotter_aVF.plot(self.parent.getlead[5])
##        self.plotter_V1.plot(self.parent.getlead[6])
##        self.plotter_V2.plot(self.parent.getlead[7])
##        self.plotter_V3.plot(self.parent.getlead[8])
##        self.plotter_V4.plot(self.parent.getlead[9])
##        self.plotter_V5.plot(self.parent.getlead[10])
##        self.plotter_V6.plot(self.parent.getlead[11])

        self.plotter_I.plot(self.parent.myECG.ecg_leadI[500:2000])
        self.plotter_II.plot(self.parent.myECG.ecg_leadII[500:2000])
        self.plotter_III.plot(self.parent.myECG.ecg_leadIII[500:2000])
        self.plotter_aVR.plot(self.parent.myECG.ecg_leadaVR[500:2000])
        self.plotter_aVL.plot(self.parent.myECG.ecg_leadaVL[500:2000])
        self.plotter_aVF.plot(self.parent.myECG.ecg_leadaVF[500:2000])
        self.plotter_V1.plot(self.parent.myECG.ecg_leadV1[500:2000])
        self.plotter_V2.plot(self.parent.myECG.ecg_leadV2[500:2000])
        self.plotter_V3.plot(self.parent.myECG.ecg_leadV3[500:2000])
        self.plotter_V4.plot(self.parent.myECG.ecg_leadV4[500:2000])
        self.plotter_V5.plot(self.parent.myECG.ecg_leadV5[500:2000])
        self.plotter_V6.plot(self.parent.myECG.ecg_leadV6[500:2000])

        self.plotter_bigII=extendPlotter(self,(1500,162))        
        #self.plotter_bigII=extendedPlotter(self,bigsizer,self.parent.myECG.ecg_leadII[500:6500])
        self.leadII_sizer.Add(self.plotter_bigII.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)
        self.plotter_bigII.extendplot(self.parent.myECG.ecg_leadII[500:6500])