ImageLayer — Natron 2.5.0 documentation

# ImageLayer

## Synopsis

A small object representing a layer of an image. For example, the base image layer is the color layer, or sometimes called “RGBA”. Some other default layers include ForwardMotion, BackwardMotion, DisparityLeft,DisparityRight, etc… .

See detailed description…

### Functions

- def `ImageLayer` (layerName,componentsPrettyName,componentsName)

- def `isColorPlane` ()

- def `getNumComponents` ()

- def `getLayerName` ()

- def `getComponentsNames` ()

- def `getComponentsPrettyName` ()

- def `getNoneComponents` ()

- def `getRGBAComponents` ()

- def `getRGBComponents` ()

- def `getAlphaComponents` ()

- def `getBackwardMotionComponents` ()

- def `getForwardMotionComponents` ()

- def `getDisparityLeftComponents` ()

- def `getDisparityRightComponents` ()

## Detailed Description

A Layer is constituted of a layer name and a set of channel names (also called components). You can get a sequence with all the channels in the layer with the function `getComponentsNames()`. For some default layers, the components may be represented by a prettier name for the end-user, such as DisparityLeft instead of XY. When the ImageLayer does not have a pretty name, its pretty name will just be a concatenation of all channel names in order.

There is one special layer in Natron: the color layer. It be represented as 3 different types: RGBA, RGB or Alpha. If the ImageLayer is a color layer, the method `isColorPlane()` will return True

### Member functions description

NatronEngine.ImageLayer.ImageLayer(layerName, componentsPrettyName, componentsName)
  Parameters

    layerName – `str`

  Make a new image layer with the given layer name, optional components pretty name and the set of channels (also called components) in the layer.

NatronEngine.ImageLayer.isColorPlane()
  Return type

    `bool`

  Returns True if this layer is a color layer, i.e: it is RGBA, RGB or alpha. The color layer is what is output by default by all nodes in Natron.

NatronEngine.ImageLayer.getNumComponents()
  Return type

    `int`

  Returns the number of channels in this layer. Can be between 0 and 4 included.

NatronEngine.ImageLayer.getLayerName()
  Return type

    `str`

  Returns the layer name

NatronEngine.ImageLayer.getComponentsNames()
  Return type

    `Sequence`

  Returns a sequence with all channels in this layer in order

NatronEngine.ImageLayer.getComponentsPrettyName()
  Return type

    `str`

  Returns the channels pretty name. E.g: DisparityLeft instead of XY

NatronEngine.ImageLayer.getNoneComponents()
  Return type

    `ImageLayer`

  Returns the default “none” layer

NatronEngine.ImageLayer.getRGBAComponents()
  Return type

    `ImageLayer`

  Returns the default “RGBA” layer

NatronEngine.ImageLayer.getRGBComponents()
  Return type

    `ImageLayer`

  Returns the default “RGB” layer

NatronEngine.ImageLayer.getAlphaComponents()
  Return type

    `ImageLayer`

  Returns the default “Alpha” layer

NatronEngine.ImageLayer.getBackwardMotionComponents()
  Return type

    `ImageLayer`

  Returns the default “Backward” layer

NatronEngine.ImageLayer.getForwardMotionComponents()
  Return type

    `ImageLayer`

  Returns the default “Forward” layer

NatronEngine.ImageLayer.getDisparityLeftComponents()
  Return type

    `ImageLayer`

  Returns the default “DisparityLeft” layer

NatronEngine.ImageLayer.getDisparityRightComponents()
  Return type

    `ImageLayer`

  Returns the default “DisparityRight” layer