CVBpy 14.0
WrappedCube Class Reference

A wrapped cube (or linear non-owning cube) wraps another pixel buffer without owning it. More...

Inherits Cube.

Public Member Functions

cvb.spectral.WrappedCube from_buffer (Union[bytes, bytearray] buffer)
 Wraps, without copying, the given python buffer in an image. More...
 
- Public Member Functions inherited from Cube
cvb.Image buffer_view (self)
 Retrieves the buffer view of the cube. More...
 
cvb.spectral.Cube clone (self)
 Copies the memory to a new instance of a cube. More...
 
cvb.spectral.Cube from_images (List[cvb.Image] images, int cube_encoding)
 Create an image, that is the result of concatenating a series of input planes. More...
 
cvb.spectral.Cube map (self, cvb.spectral.CubeRange spectral_cubeoid)
 Creates a cropped cube. More...
 
cvb.spectral.MetaData meta_data (self)
 Retrieves the metadata object of the cube. More...
 
None save (self, str envi_header_filename, str envi_binary_filename)
 Writes this cube object to ENVI-format. More...
 
List[float] spectral_density (self, int line_index, int sample_index)
 Retrieves spectral density at given pixel. More...
 
cvb.spectral.Cube swap_samples_and_lines (self)
 Swaps the dimensions for samples and lines and returns a deep copy. More...
 
cvb.spectral.Cube transpose (self, int target_view_perspective)
 Creates a transposed cube. More...
 

Additional Inherited Members

- Properties inherited from Cube
 data_type = property
 cvb.DataType: Gets the data type of this cube object.
 
 type = property
 int: Gets the type of this cube object.
 

Detailed Description

A wrapped cube (or linear non-owning cube) wraps another pixel buffer without owning it.

This class is not intended for general use. Providing invalid values or not ensuring the validity of the associated buffer at all times will most likely lead to severe problems in your application.

Member Function Documentation

◆ from_buffer()

cvb.spectral.WrappedCube from_buffer ( Union[bytes, bytearray]  buffer)

Wraps, without copying, the given python buffer in an image.

Parameters

buffer : Union[bytes, bytearray] Python buffer that supports the buffer protocol.

Returns

cvb.spectral.WrappedCube The created linear non-owning cube.