'Set image scaling levels. Can be one of:
* [blackLevel, whiteLevel]
* [[minRed, maxRed], [minGreen, maxGreen], [minBlue, maxBlue]]
Only the first format is compatible with lookup tables. See :func:`makeARGB <pyqtgraph.makeARGB>`
for more details on how levels are applied.'

def setLevels(self, levels, update=True):

    if (levels is not None):
        levels = np.asarray(levels)
    if (not fn.eq(levels, self.levels)):
        self.levels = levels
        self._effectiveLut = None
        if update:
            self.updateImage()
