ImageView

class lluvia.core.ImageView
addressModeU
addressModeV
addressModeW
allocationInfo
changeLayout(self, ImageLayout newLayout)

Changes the layout of the underlying image.

Parameters

newLayout (str.) –

The new layout. Its value must be one of the values defined in lluvia.ImageLayout:
  • Undefined

  • General

  • ColorAttachmentOptimal

  • DepthStencilAttachmentOptimal

  • DepthStencilReadOnlyOptimal

  • ShaderReadOnlyOptimal

  • TransferSrcOptimal

  • TransferDstOptimal

  • Preinitialized

  • PresentSrcKHR

  • SharedPresentKHR

  • DepthReadOnlyStencilAttachmentOptimalKHR

  • DepthAttachmentStencilReadOnlyOptimalKHR

channelType
channels
clear(self)

Clears the pixels in the image to zero.

depth
filterMode
fromHost(self, ndarray arr)

Copies the content of a numpy array to this image view.

The shape of the array must comply with the following rules.

  • If arr.ndim == 1, then this image must be 1D

    (height, depth and channels equal to 1) and img.width == arr.shape[0]

  • If arr.ndim == 2, then this image must be 2D

    (depth and channels equal to 1) and img.height == arr.shape[0] and img.width == arr.shape[1].

  • If arr.ndim == 3, then this image must be 2D (depth equal to 1)

    with the number of channels equal to arr.shape[2].

  • If arr.ndim == 4, then this image must be 3D and

    img.depth == arr.shape[0] and img.height == arr.shape[1] and img.width == arr.shape[2] and img.chhanels == arr.chape[3]

Parameters

arr (numpy.ndarray.) –

:raises ValueError : if arr does not match this image shape.:

height
image
layout
memory
normalizedCoordinates
sampled
session
shape
size
toHost(self, ndarray output=None)

Copies the content of this image view into a numpy host array.

Parameters

output (numpy.ndarray. Defaults to None.) –

:raises ValueError : if output is different than None and does not match this image shape.:

usageFlags
width