class_docstr: **Bases:** :class:`GraphicsObject <pyqtgraph.GraphicsObject>`
class_docstr_tok: ["*","*","Bases",":","*","*",":","class",":","`","GraphicsObject","<","pyqtgraph.GraphicsObject",">","`"]
docstr: Sets image scaling levels. 
  See :func:`makeARGB <pyqtgraph.makeARGB>` for more details on how levels are applied.
  
  Parameters
  ----------
      levels: array_like
          - ``[blackLevel, whiteLevel]`` 
            sets black and white levels for monochrome data and can be used with a lookup table.
          - ``[[minR, maxR], [minG, maxG], [minB, maxB]]``
            sets individual scaling for RGB values. Not compatible with lookup tables.
      update: bool, optional
          Controls if image immediately updates to reflect the new levels.
docstr_tok: ["Sets","image","scaling","levels",".","See",":","func",":","`","makeARGB","<","pyqtgraph.makeARGB",">","`","for","more","details","on","how","levels","are","applied",".","Parameters","--","--","--","--","--","levels",":","array_like","-","``","[","blackLevel",",","whiteLevel","]","``","sets","black","and","white","levels","for","monochrome","data","and","can","be","used","with","a","lookup","table",".","-","``","[","[","minR",",","maxR","]",",","[","minG",",","maxG","]",",","[","minB",",","maxB","]","]","``","sets","individual","scaling","for","RGB","values",".","Not","compatible","with","lookup","tables",".","update",":","bool",",","optional","Controls","if","image","immediately","updates","to","reflect","the","new","levels","."]
code: def setLevels(self, levels, update=True):
      """
      Sets image scaling levels.
      See :func:`makeARGB <pyqtgraph.makeARGB>` for more details on how levels are applied.
  
      Parameters
      ----------
          levels: array_like
              - ``[blackLevel, whiteLevel]``
                sets black and white levels for monochrome data and can be used with a lookup table.
              - ``[[minR, maxR], [minG, maxG], [minB, maxB]]``
                sets individual scaling for RGB values. Not compatible with lookup tables.
          update: bool, optional
              Controls if image immediately updates to reflect the new levels.
      """
      if self._xp is None:
          self.levels = levels
          self._defferedLevels = levels
          return
      if levels is not None:
          levels = self._xp.asarray(levels)
      self.levels = levels
      self._effectiveLut = None
      if update:
          self.updateImage()
  
imports: import warnings
  from collections.abc import Callable
  import numpy
  from ..None import colormap
  from ..None import debug
  from ..None import functions
  from ..None import getConfigOption
  from ..Point import Point
  from ..Qt import QtCore, QtGui, QtWidgets
  from ..util.cupy_helper import getCupy
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 8 for calling the ImageItem obj's underlying member method code with example usage: obj.setLevels(levels, update) without return types