set ImageItem as row-major

This commit is contained in:
KIU Shueng Chuan 2021-04-10 20:33:41 +08:00
parent f24bf09557
commit 900d6743d8

View File

@ -5,9 +5,8 @@ from pyqtgraph.Qt import QtGui
def check_format(shape, dtype, levels, lut, expected_format):
data = np.zeros(shape, dtype=dtype)
item = pg.ImageItem(data, autoLevels=False)
item.setLevels(levels)
item.setLookupTable(lut)
item = pg.ImageItem(axisOrder='row-major')
item.setImage(data, autoLevels=False, lut=lut, levels=levels)
item.render()
assert item.qimage.format() == expected_format