Hello.

I am currently working on an QtApllication for rapid plotting. i startet 
with the example in pyqtgraph.examples (ImageItem -video).

On my setting there occures a major memory leak. i narrowed it down to the 
call of img.setImage(data[i]).

I use the follwing modules:

pyqtgraph 0.9.10
numpy 1.11.0
PySide 1.2.2
Cython 0.24.1

python version 3.4 on winpython 1.5.2

Is this a a problem of the environment iám using, or is there acctually a 
leaking problem. I uploaded the imageItem example (ImageItem - video)

I would appreciate if you could help me with this problem.

Best regards.

Michael 

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyqtgraph+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/5eed4831-8314-410e-9cd7-13f4b4cbba0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from pyqtgraph.Qt import QtCore, QtGui
import numpy as np
import pyqtgraph as pg
import pyqtgraph.ptime as ptime

app = QtGui.QApplication([])


win = pg.GraphicsLayoutWidget()

win.show()
win.setWindowTitle("Test ImageView")
view = win.addViewBox()

view.setAspectLocked(True)

img = pg.ImageItem(border = 'w')
view.addItem(img)

view.setRange(QtCore.QRectF(0,0,600,600))

data = np.random.normal(size=(15, 600, 600), loc=1024, scale=64)
i = 0


updateTime = ptime.time()
fps = 0

def updateData():
    global img, data, i, updateTime, fps

    ## Display the data
    img.setImage(data[i])
    i = (i+1) % data.shape[0]

    QtCore.QTimer.singleShot(1, updateData)
    now = ptime.time()
    fps2 = 1.0 / (now-updateTime)
    updateTime = now
    fps = fps * 0.9 + fps2 * 0.1
    win.setWindowTitle("%0.1f fps" % fps)

    
    

    #print "%0.1f fps" % fps


updateData()

if __name__ == '__main__':

    import sys

    if sys.flags.interactive != 1 or not hasattr(QtCore, 'PYQT_VERSION'):
        
        app.instance().exec_()        
       

Reply via email to