CVBpy 14.1
PFNCBuffer Class Reference

PFNC buffer class implementing the IPFNCBuffer interface. More...

Inherits object.

Public Member Functions

cvb.PFNCBuffer from_object (Union[cvb.Image] obj)
 Create a PFNC buffer from a compatible object. More...
 
int increment (self, int index)
 Gets the increment to the next element in the given dimension. More...
 
int length (self, int index)
 Gets the number of elements in the given dimension. More...
 

Properties

 pfnc_value = property
 int: Gets the PFNC value (format identifier) of this buffer.
 
 rank = property
 int: Gets the number of dimensions of this buffer.
 

Detailed Description

PFNC buffer class implementing the IPFNCBuffer interface.

Member Function Documentation

◆ from_object()

cvb.PFNCBuffer from_object ( Union[cvb.Image obj)

Create a PFNC buffer from a compatible object.

Parameters

obj : Union[cvb.Image] Source object.

Returns

cvb.PFNCBuffer A PFNC buffer containing the data of the specified object.

◆ increment()

int increment (   self,
int  index 
)

Gets the increment to the next element in the given dimension.

For a 2d image dimension 0 would be the x-increment (offset to next pixel) and dimension 1 would be the y-increment (offset to next line). The maximal dimension is the rank - 1.

Parameters

index : int Zero-based dimension to access.

Returns

int Increment variable to receive the offset to the next element in the given dimension in bytes.

◆ length()

int length (   self,
int  index 
)

Gets the number of elements in the given dimension.

Parameters

index : int Zero-based dimension to access.

Returns

int Number of elements in the given dimension.