CVB.Net 15.0

Arithmetic operations on cubes. More...

Public Types

enum  NormalizationMethod { AverageReferences1 = 0 }
 Normalization method. More...
 
enum  PixelOverflow { Unhandled = 0 , Truncate = 1 }
 Defines how arithmetic overflows and underflows are handled. More...
 

Static Public Member Functions

static Cube Normalize (this ContinuousCube cube, ContinuousCube whiteCube, ContinuousCube blackCube, NormalizationMethod normalizationMethod)
 Normalizes a spectral cube. This function creates a normalized cube using the white- and black reference and the object cube.
 
static Cube Normalize (this LinearNonOwningCube cube, LinearNonOwningCube whiteCube, LinearNonOwningCube blackCube, NormalizationMethod normalizationMethod)
 Normalizes a spectral cube. This function creates a normalized cube using the white- and black reference and the object cube.
 
static Cube Normalize (this MappedCube cube, MappedCube whiteCube, MappedCube blackCube, NormalizationMethod normalizationMethod)
 Normalizes a spectral cube. This function creates a normalized cube using the white- and black reference and the object cube.
 
static Cube Add (this Cube cube1, Cube cube2, PixelOverflow overflowHandling=PixelOverflow.Unhandled)
 Element-wise addition of two cubes.
 
static Cube Subtract (this Cube minuend, Cube subtrahend, PixelOverflow overflowHandling=PixelOverflow.Unhandled)
 Element-wise subtraction of two cubes.
 
static Cube Multiply (this Cube cube1, Cube cube2, PixelOverflow overflowHandling=PixelOverflow.Unhandled)
 Element-wise multiplication of two cubes.
 
static Cube Divide (this Cube dividend, Cube divisor)
 Element-wise division of two cubes.
 

Detailed Description

Arithmetic operations on cubes.

Member Enumeration Documentation

◆ NormalizationMethod

Normalization method.

Enumerator
AverageReferences1 

White and black reference are averaged over all samples and lines. The normalization formula used is:
(ImgCube - BRef) / (WRef - BRef)

◆ PixelOverflow

Defines how arithmetic overflows and underflows are handled.

Enumerator
Unhandled 

No operation is done on the resulting pixel values.

Truncate 

Resulting pixel values are truncated at the data type's minimum and maximum values.

Member Function Documentation

◆ Add()

static Cube Add ( this Cube cube1,
Cube cube2,
PixelOverflow overflowHandling = PixelOverflow::Unhandled )
static

Element-wise addition of two cubes.

Parameters
cube1Any kind of cube is supported as long as the dimensions match with cube2.
cube2Any kind of cube is supported as long as the dimensions match with cube1.
overflowHandlingDefines how arithmetic overflows and underflows are handled.


Returns
Linear cube of the same dimensions and data type. The metadata is a copy from cube1.

◆ Divide()

static Cube Divide ( this Cube dividend,
Cube divisor )
static

Element-wise division of two cubes.

Parameters
dividendAny kind of cube is supported as long as the dimensions match with divisor.
divisorAny kind of cube is supported as long as the dimensions match with dividend.
Returns
Linear cube of the same dimensions and data type. The metadata is a copy from minuend.

◆ Multiply()

static Cube Multiply ( this Cube cube1,
Cube cube2,
PixelOverflow overflowHandling = PixelOverflow::Unhandled )
static

Element-wise multiplication of two cubes.

Parameters
cube1Any kind of cube is supported as long as the dimensions match with cube2.
cube2Any kind of cube is supported as long as the dimensions match with cube1.
overflowHandlingDefines how arithmetic overflows and underflows are handled.


Returns
Linear cube of the same dimensions and data type. The metadata is a copy from cube1.

◆ Normalize() [1/3]

static Cube Normalize ( this ContinuousCube cube,
ContinuousCube whiteCube,
ContinuousCube blackCube,
NormalizationMethod normalizationMethod )
static

Normalizes a spectral cube. This function creates a normalized cube using the white- and black reference and the object cube.

If you want to use this function on stacked cubes, duplicate your cube with Clone() to get a continous cube.

Parameters
cubeSpectral cube to work on.
whiteCubeThe white reference contains a linear cube. The number of bands of cube, whiteCube and darkCube must be the same.
blackCubehe black reference contains a linear cube. The number of bands of cube, whiteCube and darkCube must be the same.
normalizationMethodDefines the normalization method. More detailed information in NormalizationMethod.
Returns
Normalized cube of data type float.

◆ Normalize() [2/3]

static Cube Normalize ( this LinearNonOwningCube cube,
LinearNonOwningCube whiteCube,
LinearNonOwningCube blackCube,
NormalizationMethod normalizationMethod )
static

Normalizes a spectral cube. This function creates a normalized cube using the white- and black reference and the object cube.

If you want to use this function on stacked cubes, duplicate your cube with Clone() to get a continous cube.

Parameters
cubeSpectral cube to work on.
whiteCubeThe white reference contains a linear cube. The number of bands of cube, whiteCube and darkCube must be the same.
blackCubehe black reference contains a linear cube. The number of bands of cube, whiteCube and darkCube must be the same.
normalizationMethodDefines the normalization method. More detailed information in NormalizationMethod.
Returns
Normalized cube of data type float.

◆ Normalize() [3/3]

static Cube Normalize ( this MappedCube cube,
MappedCube whiteCube,
MappedCube blackCube,
NormalizationMethod normalizationMethod )
static

Normalizes a spectral cube. This function creates a normalized cube using the white- and black reference and the object cube.

If you want to use this function on stacked cubes, duplicate your cube with Clone() to get a continous cube.

Parameters
cubeSpectral cube to work on.
whiteCubeThe white reference contains a linear cube. The number of bands of cube, whiteCube and darkCube must be the same.
blackCubehe black reference contains a linear cube. The number of bands of cube, whiteCube and darkCube must be the same.
normalizationMethodDefines the normalization method. More detailed information in NormalizationMethod.
Returns
Normalized cube of data type float.

◆ Subtract()

static Cube Subtract ( this Cube minuend,
Cube subtrahend,
PixelOverflow overflowHandling = PixelOverflow::Unhandled )
static

Element-wise subtraction of two cubes.

Parameters
minuendAny kind of cube is supported as long as the dimensions match with subtrahend.
subtrahendAny kind of cube is supported as long as the dimensions match with minuend.
overflowHandlingDefines how arithmetic overflows and underflows are handled.


Returns
Linear cube of the same dimensions and data type. The metadata is a copy from minuend.