Inherits object.
Inherited by WrappedCube.
Public Member Functions | |
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... | |
Properties | |
data_type = property | |
cvb.DataType: Gets the data type of this cube object. | |
type = property | |
int: Gets the type of this cube object. | |
Spectral Cube object.
Creates a cube.
To create an empty continuous cube you can provide the parameters (lines, samples, bands, data_type, view_perspective).Alternatively you can provide the file names of an ENVI-formatted cube (envi_header_filename, envi_binary_filename)
lines : int Number of lines.
samples : int Number of samples.
bands : int Number of bands.
data_type : cvb.DataType Pixel data type.
cube_encoding : int View perspective on the buffer (see cvb.spectral.CubeEncoding).
envi_header_filename : str Header file of the ENVI-format data (.hdr).
envi_binary_filename : str Binary file of the ENVI-format data (.bin).
cvb.Image buffer_view | ( | self | ) |
Retrieves the buffer view of the cube.
The buffer view is the shared pointer to object containing the image. This image encapsulates the buffer of the cube. This image is of size width * height * dimensions. These dimensions can be mapped to samples, lines and bands depending on the cvb.spectral.CubeEncoding of this cube.
cvb.Image The view on the buffer through an image.
cvb.spectral.Cube clone | ( | self | ) |
Copies the memory to a new instance of a cube.
cvb.spectral.Cube New cube of type CubeType.ContinuousCube.
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.
images : List[cvb.Image] Selects the relationship between the result image and the input images.
cube_encoding : int View perspective on the buffer (see cvb.spectral.CubeEncoding).
cvb.spectral.Cube A stacked cube object.
cvb.spectral.Cube map | ( | self, | |
cvb.spectral.CubeRange | spectral_cubeoid | ||
) |
Creates a cropped cube.
The returned cube type depends on the source cube type.
spectral_cubeoid : cvb.spectral.CubeRange Crop the source cube by this cuboid.
cvb.spectral.Cube The cropped cube.
cvb.spectral.MetaData meta_data | ( | self | ) |
Retrieves the metadata object of the cube.
This method returns a shared pointer to the metadata object.
cvb.spectral.MetaData The metadata of this cube.
None save | ( | self, | |
str | envi_header_filename, | ||
str | envi_binary_filename | ||
) |
Writes this cube object to ENVI-format.
envi_header_filename : str Header file of the ENVI-format data (.hdr).
envi_binary_filename : str Binary file of the ENVI-format data (.bin).
List[float] spectral_density | ( | self, | |
int | line_index, | ||
int | sample_index | ||
) |
Retrieves spectral density at given pixel.
line_index : int Index of the line to inspect.
sample_index : int Index of the sample to inspect.
List[float] The spectral density at given pixel.
cvb.spectral.Cube swap_samples_and_lines | ( | self | ) |
Swaps the dimensions for samples and lines and returns a deep copy.
The output spectral cube contains a swapped buffer_view() of the same type. In the metadata the definition for interleave stays the same, but changes from lower to capital letters and vice versa. The change can be seen in the number of samples and number of lines, which are swapped in the output. The function is for interoperability between vendors with different definitions for samples and lines in the ENVI-format.
cvb.spectral.Cube A deep copy of the original image cube. Samples and lines are swapped.
cvb.spectral.Cube transpose | ( | self, | |
int | target_view_perspective | ||
) |
Creates a transposed cube.
The returned cube type depends on the source cube type.
target_view_perspective : int View perspective of the returned cube (see cvb.spectral.CubeEncoding).
cvb.spectral.Cube The transposed cube.