I am having trouble with a pyqtgraph w/ colorbar updating very slowly. I
have created an app in PyQt5 that takes a bunch of images, does some math,
and then displays the image in a pyqtgraph ImageView() w/ a colorbar.
When I change the colorbar bounds, it takes about 5-6 seconds to actually
move the colorbar widget to where I dragged it to, then another 5-6 seconds
to update the image.
Here is the code I use to display the image. I call "display_plot" from a
pyqtSlot inside the UI thread, no issues with it freezing/shutting down,
the UI thread should be handling the image display.
import pyqtgraph as pg from PyQt5 import QtWidgets class
ImageWindow(QtWidgets.QWidget):
def __init__(self): self.graph_widget = pg.ImageView() self.cmap =
pg.colormap.get('CET-L9') vbox = QtWidgets.QVBoxLayout(self)
vbox.addWidget(self.graph_widget) def display_plot(self, image):
self.graph_widget.setImage(image) self.graph_widget.setColorMap(self.cmap)
The image is a 3200x3200 grayscale np-image.
Is there someway I can make this ImageView() update faster? Anything I'm
doing very wrong?
Also, when you set the colorbar/image, does it create a thread that will
handle updating the image? who updates the image in this?
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/92ce9854-979b-4b73-8010-28c91bcf328fn%40googlegroups.com.