Namespace for the Spectral package. More...
Classes | |
class | Cube |
Spectral Cube object. More... | |
class | CubeRange |
3D rectangle in the samples, lines and bands domain. More... | |
class | Interpolator |
Spectral Interpolator object. More... | |
class | LinearAccessData |
Linear access properties. More... | |
class | MetaData |
Spectral MetaData object. More... | |
class | WrappedCube |
Spectral Wrapped cube objects are linear non-owning cubes. More... | |
Typedefs | |
using | MetaDataPtr = std::shared_ptr< MetaData > |
Convenience shared pointer for MetaData. | |
using | CubePtr = std::shared_ptr< Cube > |
Convenience shared pointer for Cube. | |
using | WrappedCubePtr = std::shared_ptr< WrappedCube > |
Convenience shared pointer for WrappedCube. | |
using | InterpolatorPtr = std::shared_ptr< Interpolator > |
Convenience shared pointer for Interpolator. | |
Enumerations | |
enum class | FieldID { Interleave = CExports::CVSFI_Interleave , Samples = CExports::CVSFI_Samples , Lines = CExports::CVSFI_Lines , Bands = CExports::CVSFI_Bands , DataType = CExports::CVSFI_DataType , ByteOrder = CExports::CVSFI_ByteOrder , FileType = CExports::CVSFI_FileType , HeaderOffset = CExports::CVSFI_HeaderOffset , Wavelength = CExports::CVSFI_Wavelength , WavelengthUnit = CExports::CVSFI_WavelengthUnit , Fwhm = CExports::CVSFI_Fwhm } |
FieldID enum class to access fields in the MetaData object. More... | |
enum class | FieldType { Invalid = CExports::CVSFT_Invalid , String = CExports::CVSFT_String , Float = CExports::CVSFT_Float , Integer = CExports::CVSFT_Integer , StringArray = CExports::CVSFT_StringArray , FloatArray = CExports::CVSFT_FloatArray , IntegerArray = CExports::CVSFT_IntegerArray } |
Data type of a field. More... | |
enum class | CubeEncoding { BandInterleavedByLine = CExports::CVSVP_BandInterleavedByLine , BandSequential = CExports::CVSVP_BandSequential , BandInterleavedByPixel = CExports::CVSVP_BandInterleavedByPixel } |
View Perspective: Defines how the mapping between a typical x-y image and samples-lines-bands is done. When acquiring images the interleaved type depends on the technology the imaging sensor uses to acquire spectral data. A sequence of images is returned by the camera in the following manner: [xSensor ySensor time] Now depending on the spectral imaging sensor the these dimensions are mapped to samples, lines and bands. More... | |
enum class | CubeType { ContinuousCube = CExports::CVSCT_ContinuousCube , LinearNonOwningCube = CExports::CVSCT_LinearNonOwningCube , MappedCube = CExports::CVSCT_MappedCube , StackedCube = CExports::CVSCT_StackedCube } |
Defines the type of the cube. More... | |
enum class | NormalizationMethod { AverageReferences1 = CExports::CVSNM_AverageReferences1 } |
Defines the method used for normalizing the spectral cube with a white and a black reference. More... | |
enum class | StdIlluminant { UNDEFINED = CExports::CVSSI_UNDEFINED , E = CExports::CVSSI_E , A = CExports::CVSSI_A , D50 = CExports::CVSSI_D50 , D65 = CExports::CVSSI_D65 } |
Defines Standard Illumination. More... | |
enum class | StdObserver { UNDEFINED = CExports::CVSSO_UNDEFINED , CIE2006_2deg = CExports::CVSSO_CIE2006_2deg , CIE2006_10deg = CExports::CVSSO_CIE2006_10deg , CIE1964_10deg = CExports::CVSSO_CIE1964_10deg , CIE1931_2deg = CExports::CVSSO_CIE1931_2deg } |
Defines Standard Observer. More... | |
enum class | InterpolationMethod { Linear } |
Defines the interpolation method. More... | |
enum class | PixelOverflow { Unhandled , Truncate } |
Defines how arithmetic overflows and underflows are handled. More... | |
Functions | |
std::unique_ptr< Cube > | Addition (const Cube &cube1, const Cube &cube2, PixelOverflow overflowHandling=PixelOverflow::Unhandled) |
Element-wise addition of two cubes. More... | |
std::unique_ptr< Cube > | Subtraction (const Cube &minuend, const Cube &subtrahend, PixelOverflow overflowHandling=PixelOverflow::Unhandled) |
Element-wise subtraction of two cubes. More... | |
std::unique_ptr< Cube > | Multiplication (const Cube &cube1, const Cube &cube2, PixelOverflow overflowHandling=PixelOverflow::Unhandled) |
Element-wise multiplication of two cubes. More... | |
std::unique_ptr< Cube > | Division (const Cube ÷nd, const Cube &divisor) |
Element-wise division of two Cubes. More... | |
std::unique_ptr< Cube > | Normalization (const Cube &cubeIn, const Cube &whiteReference, const Cube &blackReference, NormalizationMethod normalizationMethod) |
Normalizes a cube. More... | |
std::unique_ptr< Image > | CubeToXYZ (const Cube &cube, const Interpolator &interpolator) |
Converts a normalized cube to an XYZ image. More... | |
void | CubeToXYZ (const Cube &cube, const Interpolator &interpolator, Image &xyzImageOut) |
Converts a normalized cube to a XYZ and fills the input image with values. More... | |
std::unique_ptr< Image > | CubeToLab (const Cube &cube, const Interpolator &interpolator) |
Converts a normalized cube to a Lab image. More... | |
void | CubeToLab (const Cube &cube, const Interpolator &interpolator, Image &LabImageOut) |
Converts the cube to a Lab image. More... | |
std::unique_ptr< Image > | XYZToLab (const Image &xyzImage, const Interpolator &interpolator) |
Converts an image from XYZ to Lab. More... | |
std::unique_ptr< Image > | LabToRGB8 (const Image &LabImage, const Interpolator &interpolator) |
Converts a Lab image to a sRGB 8bit image. More... | |
Namespace for the Spectral package.
|
strong |
View Perspective: Defines how the mapping between a typical x-y image and samples-lines-bands is done. When acquiring images the interleaved type depends on the technology the imaging sensor uses to acquire spectral data. A sequence of images is returned by the camera in the following manner: [xSensor ySensor time] Now depending on the spectral imaging sensor the these dimensions are mapped to samples, lines and bands.
When viewing a spectral cube the spatial dimensions are mapped in the following manner:
|
strong |
|
strong |
FieldID enum class to access fields in the MetaData object.
Enumerator | |
---|---|
Interleave | Defines the way the spectral data of the buffer is ordered (CubeEncoding) |
Samples | The number of samples. |
Lines | The number of lines. |
Bands | The number of bands. |
DataType | Datatype as defined in the ENVI-format
|
ByteOrder | Byte order
|
FileType | File type: Default value: "ENVI Standard" |
HeaderOffset | Header offset in bytes Number of bytes to skip when reading the ENVI-binary file |
Wavelength | Array of wavelengths with the unit given in FieldID::WavelengthUnit. |
WavelengthUnit | Wavelength unit
|
Fwhm | Array of Full-width-half-maximum values The same unit as in FieldID::WavelengthUnit |
|
strong |
Data type of a field.
|
strong |
|
strong |
Defines the method used for normalizing the spectral cube with a white and a black reference.
|
strong |
|
strong |
|
strong |
std::unique_ptr< Cube > Addition | ( | const Cube & | cube1, |
const Cube & | cube2, | ||
PixelOverflow | overflowHandling = PixelOverflow::Unhandled |
||
) |
Element-wise addition of two cubes.
Creates a new cube after adding all values of cube1 and cube2 for each element (cube1 + cube2)
[in] | cube1 | Any kind of cube is supported as long as the dimensions match with cube2 |
[in] | cube2 | Any kind of cube is supported as long as the dimensions match with cube1 |
[in] | overflowHandling | In case of Truncate: Clips the resulting pixel values to the maximum/minimum possible value of the resulting data type. In case of Unhandled the result might lead to overflow |
std::unique_ptr< Image > CubeToLab | ( | const Cube & | cube, |
const Interpolator & | interpolator | ||
) |
Converts a normalized cube to a Lab image.
[in] | cube | Normalized linear Cube. Number of bands need to match with the ones in Interpolator handle. |
[in] | interpolator | Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
Takes an image cube and converts it to a Lab image.
void CubeToLab | ( | const Cube & | cube, |
const Interpolator & | interpolator, | ||
Image & | LabImageOut | ||
) |
Converts the cube to a Lab image.
Takes a normalized image cube and converts it to a Lab image
[in] | cube | Normalized linear Cube of datatype float or double. Number of bands need to match with the ones in interpolator. |
[in] | interpolator | Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
[in,out] | LabImageOut | Image needs to support linear access and be of datatype float / double with the dimensions: samples x lines x 3 [width x height x planes]. This image can be a mapped image |
std::unique_ptr< Image > CubeToXYZ | ( | const Cube & | cube, |
const Interpolator & | interpolator | ||
) |
Converts a normalized cube to an XYZ image.
[in] | cube | Normalized linear Cube with matching number of bands with the ones in interpolator handle. |
[in] | interpolator | Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
Takes an image cube and converts it to a XYZ image.
void CubeToXYZ | ( | const Cube & | cube, |
const Interpolator & | interpolator, | ||
Image & | xyzImageOut | ||
) |
Converts a normalized cube to a XYZ and fills the input image with values.
[in] | cube | Normalized linear Cube of datatype float or double. Number of bands need to match with the ones in Interpolator handle. |
[in] | interpolator | Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
[in,out] | xyzImageOut | Image needs to support linear access and be of datatype float / double with the dimensions: samples x lines x 3 [width x height x planes]. This image can be a mapped image |
Takes an image cube and converts it to a XYZ image. In addition this function takes an existing image and fills it with xyz-values.
std::unique_ptr< Cube > Division | ( | const Cube & | dividend, |
const Cube & | divisor | ||
) |
Element-wise division of two Cubes.
Creates a new Cube after dividing all values of dividend and divisor for each element (dividend / divisor)
[in] | dividend | Any kind of cube is supported as long as the dimensions match with divisor |
[in] | divisor | Any kind of cube is supported as long as the dimensions match with dividend |
std::unique_ptr< Image > LabToRGB8 | ( | const Image & | LabImage, |
const Interpolator & | interpolator | ||
) |
Converts a Lab image to a sRGB 8bit image.
[in] | LabImage | 3-planed image of data type float / double containing the Lab-values |
[in] | interpolator | Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
std::unique_ptr< Cube > Multiplication | ( | const Cube & | cube1, |
const Cube & | cube2, | ||
PixelOverflow | overflowHandling = PixelOverflow::Unhandled |
||
) |
Element-wise multiplication of two cubes.
Creates a new cube after multiplying all values of cube1 and cube2 for each element (cube1 * cube2)
[in] | cube1 | Any kind of cube is supported as long as the dimensions match with cube2 |
[in] | cube2 | Any kind of cube is supported as long as the dimensions match with cube1 |
[in] | overflowHandling | In case of Truncate: Clips the resulting pixel values to the maximum/minimum possible value of the resulting data type. In case of Unhandled the result might lead to overflow |
std::unique_ptr< Cube > Normalization | ( | const Cube & | cubeIn, |
const Cube & | whiteReference, | ||
const Cube & | blackReference, | ||
NormalizationMethod | normalizationMethod | ||
) |
Normalizes a cube.
This function creates a normalized cube using the white- and black reference and the object cube. More details in NormalizationMethod
[in] | cubeIn | Spectral Cube to work on |
[in] | whiteReference | The white reference contains a linear Cube with matching dimensions for samples and bands to cubeIn |
[in] | blackReference | The black reference contains a linear Cube with matching dimensions for samples and bands to cubeIn |
[in] | normalizationMethod | Defines the normalization method. More detailed information in NormalizationMethod |
std::unique_ptr< Cube > Subtraction | ( | const Cube & | minuend, |
const Cube & | subtrahend, | ||
PixelOverflow | overflowHandling = PixelOverflow::Unhandled |
||
) |
Element-wise subtraction of two cubes.
Creates a new cube after subtracting all values of minuend and subtrahend for each element (minuend - subtrahend)
[in] | minuend | Any kind of cube is supported as long as the dimensions match with subtrahend |
[in] | subtrahend | Any kind of cube is supported as long as the dimensions match with minuend |
[in] | overflowHandling | In case of Truncate: Clips the resulting pixel values to the maximum/minimum possible value of the resulting data type. In case of Unhandled the result might lead to overflow |
std::unique_ptr< Image > XYZToLab | ( | const Image & | xyzImage, |
const Interpolator & | interpolator | ||
) |
Converts an image from XYZ to Lab.
[in] | xyzImage | 3-planed image of data type float / double containing the XYZ-values |
[in] | interpolator | Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |