class_docstr: Visual subclass displaying an image.
  
  Parameters
  ----------
  data : ndarray
      ImageVisual data. Can be shape (M, N), (M, N, 3), or (M, N, 4).
      If floating point data is provided and contains NaNs, they will
      be made transparent (discarded) for the single band data case when
      scaling is done on the GPU (see ``texture_format``). On the CPU,
      single band NaNs are mapped to 0 as they are sent to the GPU which
      result in them using the lowest ``clim`` value in the GPU.
      For RGB data, NaNs will be mapped to the lowest ``clim`` value.
      If the Alpha band is NaN it will be mapped to 0 (transparent).
      Note that NaN handling is not required by some OpenGL implementations
      and NaNs may be treated differently on some systems (ex. as 0s).
  method : str
      Selects method of rendering image in case of non-linear transforms.
      Each method produces similar results, but may trade efficiency
      and accuracy. If the transform is linear, this parameter is ignored
      and a single quad is drawn around the area of the image.
  
          * 'auto': Automatically select 'impostor' if the image is drawn
            with a nonlinear transform; otherwise select 'subdivide'.
          * 'subdivide': ImageVisual is represented as a grid of triangles
            with texture coordinates linearly mapped.
          * 'impostor': ImageVisual is represented as a quad covering the
            entire view, with texture coordinates determined by the
            transform. This produces the best transformation results, but may
            be slow.
  
  grid: tuple (rows, cols)
      If method='subdivide', this tuple determines the number of rows and
      columns in the image grid.
  cmap : str | ColorMap
      Colormap to use for luminance images.
  clim : str | tuple
      Limits to use for the colormap. I.e. the values that map to black and white
      in a gray colormap. Can be 'auto' to auto-set bounds to
      the min and max of the data. If not given or None, 'auto' is used.
  gamma : float
      Gamma to use during colormap lookup.  Final color will be cmap(val**gamma).
      by default: 1.
  interpolation : str
      Selects method of texture interpolation. Makes use of the two hardware
      interpolation methods and the available interpolation methods defined
      in vispy/gloo/glsl/misc/spatial_filters.frag
  
          * 'nearest': Default, uses 'nearest' with Texture interpolation.
          * 'linear': uses 'linear' with Texture interpolation.
          * 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'cubic',
              'catrom', 'mitchell', 'spline16', 'spline36', 'gaussian',
              'bessel', 'sinc', 'lanczos', 'blackman'
          * 'custom': uses the sampling kernel provided through 'custom_kernel'.
  texture_format: numpy.dtype | str | None
      How to store data on the GPU. OpenGL allows for many different storage
      formats and schemes for the low-level texture data stored in the GPU.
      Most common is unsigned integers or floating point numbers.
      Unsigned integers are the most widely supported while other formats
      may not be supported on older versions of OpenGL or with older GPUs.
      Default value is ``None`` which means data will be scaled on the
      CPU and the result stored in the GPU as an unsigned integer. If a
      numpy dtype object, an internal texture format will be chosen to
      support that dtype and data will *not* be scaled on the CPU. Not all
      dtypes are supported. If a string, then
      it must be one of the OpenGL internalformat strings described in the
      table on this page: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml
      The name should have `GL_` removed and be lowercase (ex.
      `GL_R32F` becomes ``'r32f'``). Lastly, this can also be the string
      ``'auto'`` which will use the data type of the provided image data
      to determine the internalformat of the texture.
      When this is specified (not ``None``) data is scaled on the
      GPU which allows for faster color limit changes. Additionally, when
      32-bit float data is provided it won't be copied before being
      transferred to the GPU.
  custom_kernel: numpy.ndarray
      Kernel used for texture sampling when interpolation is set to 'custom'.
  **kwargs : dict
      Keyword arguments to pass to `Visual`.
  
  Notes
  -----
  The colormap functionality through ``cmap`` and ``clim`` are only used
  if the data are 2D.
class_docstr_tok: ["Visual","subclass","displaying","an","image",".","Parameters","--","--","--","--","--","data",":","ndarray","ImageVisual","data",".","Can","be","shape","(","M",",","N",")",",","(","M",",","N",",","3",")",",","or","(","M",",","N",",","4",")",".","If","floating","point","data","is","provided","and","contains","NaNs",",","they","will","be","made","transparent","(","discarded",")","for","the","single","band","data","case","when","scaling","is","done","on","the","GPU","(","see","``","texture_format","``",")",".","On","the","CPU",",","single","band","NaNs","are","mapped","to","0","as","they","are","sent","to","the","GPU","which","result","in","them","using","the","lowest","``","clim","``","value","in","the","GPU",".","For","RGB","data",",","NaNs","will","be","mapped","to","the","lowest","``","clim","``","value",".","If","the","Alpha","band","is","NaN","it","will","be","mapped","to","0","(","transparent",")",".","Note","that","NaN","handling","is","not","required","by","some","OpenGL","implementations","and","NaNs","may","be","treated","differently","on","some","systems","(","ex",".","as","0s",")",".","method",":","str","Selects","method","of","rendering","image","in","case","of","non-linear","transforms",".","Each","method","produces","similar","results",",","but","may","trade","efficiency","and","accuracy",".","If","the","transform","is","linear",",","this","parameter","is","ignored","and","a","single","quad","is","drawn","around","the","area","of","the","image",".","*","'auto","'",":","Automatically","select","'impostor","'","if","the","image","is","drawn","with","a","nonlinear","transform",";","otherwise","select","'subdivide","'",".","*","'subdivide","'",":","ImageVisual","is","represented","as","a","grid","of","triangles","with","texture","coordinates","linearly","mapped",".","*","'impostor","'",":","ImageVisual","is","represented","as","a","quad","covering","the","entire","view",",","with","texture","coordinates","determined","by","the","transform",".","This","produces","the","best","transformation","results",",","but","may","be","slow",".","grid",":","tuple","(","rows",",","cols",")","If","method='subdivide","'",",","this","tuple","determines","the","number","of","rows","and","columns","in","the","image","grid",".","cmap",":","str","|","ColorMap","Colormap","to","use","for","luminance","images",".","clim",":","str","|","tuple","Limits","to","use","for","the","colormap",".","I.e",".","the","values","that","map","to","black","and","white","in","a","gray","colormap",".","Can","be","'auto","'","to","auto-set","bounds","to","the","min","and","max","of","the","data",".","If","not","given","or","None",",","'auto","'","is","used",".","gamma",":","float","Gamma","to","use","during","colormap","lookup",".","Final","color","will","be","cmap","(","val","*","*","gamma",")",".","by","default",":","1.","interpolation",":","str","Selects","method","of","texture","interpolation",".","Makes","use","of","the","two","hardware","interpolation","methods","and","the","available","interpolation","methods","defined","in","vispy\/gloo\/glsl\/misc\/spatial_filters.frag","*","'nearest","'",":","Default",",","uses","'nearest","'","with","Texture","interpolation",".","*","'linear","'",":","uses","'linear","'","with","Texture","interpolation",".","*","'hanning","'",",","'hamming","'",",","'hermite","'",",","'kaiser","'",",","'quadric","'",",","'cubic","'",",","'catrom","'",",","'mitchell","'",",","'spline16","'",",","'spline36","'",",","'gaussian","'",",","'bessel","'",",","'sinc","'",",","'lanczos","'",",","'blackman'","*","'custom","'",":","uses","the","sampling","kernel","provided","through","'custom_kernel","'",".","texture_format",":","numpy.dtype","|","str","|","None","How","to","store","data","on","the","GPU",".","OpenGL","allows","for","many","different","storage","formats","and","schemes","for","the","low-level","texture","data","stored","in","the","GPU",".","Most","common","is","unsigned","integers","or","floating","point","numbers",".","Unsigned","integers","are","the","most","widely","supported","while","other","formats","may","not","be","supported","on","older","versions","of","OpenGL","or","with","older","GPUs",".","Default","value","is","``","None","``","which","means","data","will","be","scaled","on","the","CPU","and","the","result","stored","in","the","GPU","as","an","unsigned","integer",".","If","a","numpy","dtype","object",",","an","internal","texture","format","will","be","chosen","to","support","that","dtype","and","data","will","*","not","*","be","scaled","on","the","CPU",".","Not","all","dtypes","are","supported",".","If","a","string",",","then","it","must","be","one","of","the","OpenGL","internalformat","strings","described","in","the","table","on","this","page",":","https",":","\/\/www.khronos.org\/registry\/OpenGL-Refpages\/gl4\/html\/glTexImage2D.xhtml","The","name","should","have","`","GL_","`","removed","and","be","lowercase","(","ex",".","`","GL_R32F","`","becomes","``","'r32f","'","``",")",".","Lastly",",","this","can","also","be","the","string","``","'auto","'","``","which","will","use","the","data","type","of","the","provided","image","data","to","determine","the","internalformat","of","the","texture",".","When","this","is","specified","(","not","``","None","``",")","data","is","scaled","on","the","GPU","which","allows","for","faster","color","limit","changes",".","Additionally",",","when","32-bit","float","data","is","provided","it","wo","n't","be","copied","before","being","transferred","to","the","GPU",".","custom_kernel",":","numpy.ndarray","Kernel","used","for","texture","sampling","when","interpolation","is","set","to","'custom","'",".","*","*","kwargs",":","dict","Keyword","arguments","to","pass","to","`","Visual","`",".","Notes","--","--","-","The","colormap","functionality","through","``","cmap","``","and","``","clim","``","are","only","used","if","the","data","are","2D","."]
docstr: Get rendering method name.
docstr_tok: ["Get","rendering","method","name","."]
code: def method(self):
      """Get rendering method name."""
      return self._method
  
imports: from __future__ import division
  import warnings
  import numpy
  from ..gloo import Texture2D, VertexBuffer
  from ..color import get_colormap
  from .shaders import Function, FunctionChain
  from .transforms import NullTransform
  from .visual import Visual
  from ..io import load_spatial_filters
  from ._scalable_textures import CPUScaledTexture2D, GPUScaledTexture2D
label_desc: Use image node_id 14 for calling the ImageVisual obj's underlying member method code with example usage: obj.method() and returns: self