Spectral Wrapped cube objects are linear non-owning cubes. More...
#include <cvb/spectral/wrapped_cube.hpp>
Inherits Cube.
Static Public Member Functions | |
static std::unique_ptr< WrappedCube > | Create (void *pBase, int numSamples, int numLines, int numBands, Cvb::DataType datatype, intptr_t sampleInc, intptr_t lineInc, intptr_t bandInc) |
Creates a wrapped cube object of type linear non-owning. | |
static std::unique_ptr< WrappedCube > | FromHandle (HandleGuard< WrappedCube > &&guard) |
Creates wrapped cube from a classic API handle. | |
![]() | |
static std::unique_ptr< Cube > | Create (int numSamples, int numLines, int numBands, DataType dataType, CubeEncoding bufferLayout=CubeEncoding::BandInterleavedByLine) |
Creates a Continuous Cube object. | |
static std::unique_ptr< Cube > | FromImages (const std::vector< ImagePtr > &images, CubeEncoding bufferLayout) |
Initializes a stacked cube using an array of images. | |
static std::unique_ptr< Cube > | Load (Cvb::String EnviHeader, Cvb::String EnviBinary) |
Static function Loads a cube from ENVI. | |
static std::unique_ptr< Cube > | FromHandle (HandleGuard< Cube > &&guard) |
Creates cube from a classic API handle. | |
Additional Inherited Members | |
![]() | |
std::unique_ptr< Cube > | Clone () |
Copies the memory to a new instance of a cube. | |
CubeType | Type () const |
Retrieves the type of this cube object. | |
class DataType | DataType () const |
Retrieves the data type of this cube object. | |
std::unique_ptr< Cube > | Convert (CubeEncoding targetView) const |
Converts cube to given cube encoding targetView. | |
std::unique_ptr< Cube > | Map (CubeRange spectralCubeoid) |
Creates a cropped cube. | |
Cvb::ImagePtr | BufferView () const |
Retrieves the buffer view of the cube. | |
MetaDataPtr | MetaData () const |
Retrieves the meta data object of the cube. | |
bool | TryLinearAccess (LinearAccessData &linearAccessOut) const noexcept |
Retrieve linear access of cube data without throwing an exception. | |
LinearAccessData | LinearAccess () const |
Retrieve linear access of cube data. | |
template<typename T> | |
std::vector< T > | SpectralDensity (int sampleIndex, int lineIndex) const |
Retrieves spectral density at given pixel. | |
void | Save (Cvb::String EnviHeader, Cvb::String EnviBinary) const |
Writes this cube object to ENVI-format. | |
void * | Handle () const noexcept |
Returns C-API style handle to the Cube. | |
bool | TryBufferView (ImagePtr &bufferViewOut) const noexcept |
Retrieves the buffer view of the cube without throwing an exception. | |
bool | TryMetaData (MetaDataPtr &metaDataOut) const noexcept |
Retrieves the meta data object of the cube without throwing an exception. | |
Spectral Wrapped cube objects are linear non-owning cubes.
A WrappedCube can be created from an existing buffer. Consequently they do not own their buffer. The buffer needs to be linear, meaning each increment is independent.
|
inlinestatic |
Creates a wrapped cube object of type linear non-owning.
[in] | pBase | Base pointer to the buffer |
[in] | numSamples | Number of samples |
[in] | numLines | Number of lines |
[in] | numBands | Number of bands |
[in] | datatype | Data type |
[in] | sampleInc | Increment for samples |
[in] | lineInc | Increment for lines |
[in] | bandInc | Increment for bands |
Any | exception derived from std::exception including CvbException. |
|
inlinestatic |
Creates wrapped cube from a classic API handle.
[in] | guard | Life time guard for C-API handle. |
Any | exception derived from std::exception including CvbException. |
The Cube takes ownership of the handle, so you must share it before using this function.
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.