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. More... | |
static std::unique_ptr< WrappedCube > | FromHandle (HandleGuard< WrappedCube > &&guard) |
Creates wrapped cube from a classic API handle. More... | |
Static Public Member Functions inherited from Cube | |
static std::unique_ptr< Cube > | Create (int numSamples, int numLines, int numBands, DataType dataType, CubeEncoding bufferLayout=CubeEncoding::BandInterleavedByLine) |
Creates a Continuous Cube object. More... | |
static std::unique_ptr< Cube > | FromImages (const std::vector< ImagePtr > &images, CubeEncoding bufferLayout) |
Initializes a stacked cube using an array of images. More... | |
static std::unique_ptr< Cube > | Load (Cvb::String EnviHeader, Cvb::String EnviBinary) |
Static function Loads a cube from ENVI. More... | |
static std::unique_ptr< Cube > | FromHandle (HandleGuard< Cube > &&guard) |
Creates cube from a classic API handle. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Cube | |
std::unique_ptr< Cube > | Clone () |
Copies the memory to a new instance of a cube. More... | |
CubeType | Type () const |
Retrieves the type of this cube object. More... | |
class DataType | DataType () const |
Retrieves the data type of this cube object. More... | |
std::unique_ptr< Cube > | Convert (CubeEncoding targetView) const |
Converts cube to given cube encoding targetView. More... | |
std::unique_ptr< Cube > | Map (CubeRange spectralCubeoid) |
Creates a cropped cube. More... | |
Cvb::ImagePtr | BufferView () const |
Retrieves the buffer view of the cube. More... | |
MetaDataPtr | MetaData () const |
Retrieves the meta data object of the cube. More... | |
bool | TryLinearAccess (LinearAccessData &linearAccessOut) const noexcept |
Retrieve linear access of cube data without throwing an exception. More... | |
LinearAccessData | LinearAccess () const |
Retrieve linear access of cube data. More... | |
template<typename T > | |
std::vector< T > | SpectralDensity (int sampleIndex, int lineIndex) const |
Retrieves spectral density at given pixel. More... | |
void | Save (Cvb::String EnviHeader, Cvb::String EnviBinary) const |
Writes this cube object to ENVI-format. More... | |
void * | Handle () const noexcept |
Returns C-API style handle to the Cube. More... | |
bool | TryBufferView (ImagePtr &bufferViewOut) const noexcept |
Retrieves the buffer view of the cube without throwing an exception. More... | |
bool | TryMetaData (MetaDataPtr &metaDataOut) const noexcept |
Retrieves the meta data object of the cube without throwing an exception. More... | |
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.