Base class for cubes.
More...
Inherits INativeHandle, and ICloneable.
Inherited by ContinuousCube, LinearNonOwningCube, MappedCube, and StackedCube.
|
IntPtr | Handle [get] |
| Native handle of the calibrator.
|
|
bool | IsDisposed [get] |
| Gets if the native handle has been disposed.
|
|
DataType | DataType [get] |
| Gets the data type of this cube. More...
|
|
Image | BufferView [get] |
| Gets the buffer view of this cube.
|
|
MetaData | MetaData [get, set] |
| Metadata of this cube.
|
|
Properties inherited from INativeHandle |
IntPtr | Handle [get] |
| The native handle of the object.
|
|
bool | IsDisposed [get] |
| Possibility to check whether the object has already been disposed of.
|
|
◆ Cube() [1/2]
Constructor.
- Parameters
-
handle | Native handle to the cube object. |
- Exceptions
-
ArgumentException | When handle is IntPtr.Zero. |
◆ Cube() [2/2]
Constructor.
- Parameters
-
handle | Native handle to the cube object. |
useMemoryPressure | Guesses memory pressure if UseMemoryPressure.Yes is set. |
- Exceptions
-
ArgumentException | When handle is IntPtr.Zero. |
◆ Clone()
Copies this cubes memory to a new cube.
- Returns
- Copied cube.
- Exceptions
-
◆ Convert()
Creates a converted cube.
- Parameters
-
targetEncoding | Target encoding of the resulting cube. |
- Returns
- Converted cube. The output cube type is a continous cube. Data are copied.
- Exceptions
-
◆ Create()
Creates a new continuous cube.
- Parameters
-
numSamples | Amount of samples. |
numLines | Amount of lines. |
numBands | Amount of bands. |
dataType | Data type of the cube. |
bufferLayout | Buffer layout of the cube. |
- Returns
- Newly created continuous cube.
- Exceptions
-
◆ Crop()
Creates a cropped cube.
- Parameters
-
spectralCuboid | Cuboid with which to crop this cube. |
- Returns
- Cropped cube. The output cube type depends on the input cube type.
Input Type | Output Type |
Continuous | Mapped |
Mapped | Mapped |
Stacked | Continuous |
LinearNonOwning | LinearNonOwning |
- Exceptions
-
◆ Dispose()
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
IDisposable helper function.
- Parameters
-
◆ FromFile()
static ContinuousCube FromFile |
( |
string |
enviHeader, |
|
|
string |
enviBinary |
|
) |
| |
|
static |
Loads a cube from file.
- Parameters
-
enviHeader | Header file to load. |
enviBinary | Binary file to load. |
- Returns
- Loaded cube.
- Exceptions
-
◆ FromHandle()
static Cube FromHandle |
( |
IntPtr |
handle | ) |
|
|
static |
Creates a new cube object from the given handle .
- Parameters
-
- Returns
- Newly created cube.
- Exceptions
-
ArgumentException | When the given handle is not valid. |
◆ FromImages()
Creates a new stacked cube from the given images .
- Parameters
-
images | Images to use for creating the cube. |
bufferLayout | Buffer layout of the cube. |
- Returns
- Newly created stacked cube.
- Exceptions
-
◆ GetLinearAccess()
Gets the linear access data for this cube.
- Returns
- Linear access data.
◆ GetSpectralDensity< T >()
T[] GetSpectralDensity< T > |
( |
int |
sampleIndex, |
|
|
int |
lineIndex |
|
) |
| |
Retrieves the spectral density at the given pixel.
- Template Parameters
-
T | Type of the spectral density. Can be int or double. |
- Parameters
-
sampleIndex | Index of the sample to inspect. |
lineIndex | Index of the line do inspect. |
- Returns
- The spectral density at the given pixel.
- Exceptions
-
ArgumentException | When T is not int or double. |
CvbException | When getting the spectral density failed. |
◆ Save()
void Save |
( |
string |
enviHeader, |
|
|
string |
enviBinary |
|
) |
| |
Saves the cube header and data to the specified files.
- Parameters
-
enviHeader | File to save the header to. |
enviBinary | File to save the binary data to. |
◆ Slice()
Image Slice |
( |
int |
planeIndex, |
|
|
bool |
targetMapped |
|
) |
| |
Gets an image handle on a certain plane of the image cube. If targetMapped is true, the image slice returned is a deep copy of the the actual image plane in the cube. The slice axis depends on the cube encoding:
- CVSVP_BandInterleavedByLine : Sample-Band slice
- CVSVP_BandSequential : Sample-Line slice
- CVSVP_BandInterleavedByPixel : Band-Sample slice
- Parameters
-
planeIndex | Plane Index in the range [0, numberOfPlanes[ |
targetMapped | When set to true the output image is a mapped view of the original buffer. |
- Returns
- The selected slice.
◆ TryGetLinearAccess()
Tries to get the linear access data for this cube.
- Parameters
-
linearAccess | Linear access data. |
- Returns
- True if linear access data was successfully fetched, false if not.
◆ DataType
Gets the data type of this cube.
- Exceptions
-
◆ ObjectDisposing
Raised when this object is about to be disposed via the IDisposable.Dispose method.
This event is raised right before this object is disposed. The dispose itself cannot be canceled.