Hi All, I have a greylevel image and a binary mask. I would like to display the binary mask (img2 below) as overlay to the greylevel image but with a specific color for the binary mask (let's say red)
import pyqtgraph as pg import numpy as np from pyqtgraph.Qt import QtCore, QtGui pg.setConfigOptions(imageAxisOrder='row-major') app = QtGui.QApplication([]) win = pg.GraphicsWindow() vb = win.addViewBox() img1 = pg.ImageItem(pg.np.random.normal(size=(100, 100))) img2 = np.zeros_like(img1, dtype='uint8') img2[40:60, 40:60] = 255 vb.addItem(img1) vb.addItem(img2) img2.setZValue(10) img2.setOpacity(0.5) img2.scale(10,10) win.show() QtGui.QApplication.instance().exec_() I have looked for a solution on the net for 3 days wi th no success: the only color stuff is about colormaps but I may be wrong but this is not what I am lookign for. Your help would be appreciated -- 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/32e723a0-8832-4c84-991c-3b20b6a48fc6%40googlegroups.com.
