ImageView

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

Changes the layout of the underlying image.

Parameters

newLayoutstr.
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)

Immediately clears the image pixels to zero.

This method creates a command buffer and sumbits it to clear all the pixels in the underlying image to zero. Execution is blocked until the operation is completed.

copyTo(self, dst)

Immediately copies the content of this image into the destination.

This method creates a command buffer and sumbits it to copy the content of this image into dst. No valiation of destination image shape is performed. Execution is blocked until the operation is completed.

Parameters

dstImage or ImageView

Destination object.

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
minimumSize
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