Meta data exports. More...
Enumerations | |
enum | CVSField { CVSFI_Interleave = 0 , CVSFI_Samples = 1 , CVSFI_Lines = 2 , CVSFI_Bands = 3 , CVSFI_DataType = 4 , CVSFI_ByteOrder = 5 , CVSFI_FileType = 6 , CVSFI_HeaderOffset = 7 , CVSFI_Wavelength = 8 , CVSFI_WavelengthUnit = 9 , CVSFI_Fwhm = 10 } |
Field index to access fields in the MetaData handle. More... | |
enum | CVSFieldType { CVSFT_Invalid = -1 , CVSFT_String = 0 , CVSFT_Float = 1 , CVSFT_Integer = 2 , CVSFT_StringArray = 3 , CVSFT_FloatArray = 4 , CVSFT_IntegerArray = 5 } |
Data Type of a field. More... | |
Functions | |
cvbres_t | CVSCreateMetaData (CVSMETADATA &MetaData) |
Creates an empty meta data handle. More... | |
cvbres_t | CVSMetaDataAddToFloatArray (CVSMETADATA MetaData, CVSField FieldEnum, double Element) |
Append a double element to a MetaData field of type double array. More... | |
cvbres_t | CVSMetaDataAddToIntegerArray (CVSMETADATA MetaData, CVSField FieldEnum, cvbint64_t Element) |
Append an integer element to a MetaData field of type integer array. More... | |
cvbres_t | CVSMetaDataAddToStringArray (CVSMETADATA MetaData, CVSField FieldEnum, const char *String) |
Append a string element to a meta data field of type string array. More... | |
cvbres_t | CVSMetaDataAddToStringArrayW (CVSMETADATA MetaData, CVSField FieldEnum, const wchar_t *String) |
Append a wstring element to a meta data field of type wstring array. More... | |
cvbres_t | CVSMetaDataClearField (CVSMETADATA MetaData, CVSField FieldEnum) |
Clears the specified field. More... | |
cvbres_t | CVSMetaDataGetArraySize (CVSMETADATA MetaData, CVSField FieldEnum, size_t &NumberOfElements) |
Retrieves the array size of a field. More... | |
cvbres_t | CVSMetaDataGetAsFloat (CVSMETADATA MetaData, CVSField FieldEnum, double &Value) |
Retrieve a field value as double. More... | |
cvbres_t | CVSMetaDataGetAsFloatArray (CVSMETADATA MetaData, CVSField FieldEnum, cvbval_t ElementIndex, double &Element) |
Retrieves a double element from an array in a meta data field. More... | |
cvbres_t | CVSMetaDataGetAsInteger (CVSMETADATA MetaData, CVSField FieldEnum, cvbint64_t &Value) |
Retrieve a field value as integer. More... | |
cvbres_t | CVSMetaDataGetAsIntegerArray (CVSMETADATA MetaData, CVSField FieldEnum, cvbval_t ElementIndex, cvbint64_t &Element) |
Retrieves an integer element from an array in a meta data field. More... | |
cvbres_t | CVSMetaDataGetAsString (CVSMETADATA MetaData, CVSField FieldEnum, char *Value, size_t &ValueSize) |
Retrieve a field value as string. More... | |
cvbres_t | CVSMetaDataGetAsStringArray (CVSMETADATA MetaData, CVSField FieldEnum, cvbval_t ElementIndex, char *String, size_t &StringLength) |
Retrieves a string element of a meta data field. More... | |
cvbres_t | CVSMetaDataGetAsStringArrayW (CVSMETADATA MetaData, CVSField FieldEnum, cvbval_t ElementIndex, wchar_t *String, size_t &StringLength) |
Retrieves a wstring element of a meta data field. More... | |
cvbres_t | CVSMetaDataGetAsStringW (CVSMETADATA MetaData, CVSField FieldEnum, wchar_t *Value, size_t &ValueSize) |
Retrieve a field value as wstring. More... | |
cvbres_t | CVSMetaDataGetFieldnameAsString (CVSMETADATA MetaData, CVSField FieldEnum, char *FieldName, size_t &FieldNameSize) |
Retrieve the field name as string. More... | |
cvbres_t | CVSMetaDataGetFieldnameAsStringW (CVSMETADATA MetaData, CVSField FieldEnum, wchar_t *FieldName, size_t &FieldNameSize) |
Retrieve the field name as wstring. More... | |
cvbres_t | CVSMetaDataGetFieldType (CVSMETADATA MetaData, CVSField FieldEnum, CVSFieldType &Type) |
Get data type of meta data field. More... | |
cvbres_t | CVSMetaDataGetNumberOfFields (CVSMETADATA MetaData, size_t &NumberOfFields) |
Get the total number of fields. More... | |
cvbres_t | CVSMetaDataIsFieldDefined (CVSMETADATA MetaData, CVSField FieldEnum, cvbbool_t &IsDefined) |
Check if a field is defined. More... | |
cvbres_t | CVSMetaDataSetAsFloat (CVSMETADATA MetaData, CVSField FieldEnum, double Value) |
Set meta data field as double. More... | |
cvbres_t | CVSMetaDataSetAsInteger (CVSMETADATA MetaData, CVSField FieldEnum, cvbint64_t Value) |
Set a meta data field as integer. More... | |
cvbres_t | CVSMetaDataSetAsString (CVSMETADATA MetaData, CVSField FieldEnum, const char *Value) |
Set meta data field as string. More... | |
cvbres_t | CVSMetaDataSetAsStringW (CVSMETADATA MetaData, CVSField FieldEnum, const wchar_t *Value) |
Set meta data field as wstring. More... | |
Meta data exports.
enum CVSField |
Field index to access fields in the MetaData handle.
Enumerator | |
---|---|
CVSFI_Interleave | Defines the way the spectral data of the buffer is ordered, see also https://www.l3harrisgeospatial.com/docs/enviimagefiles.html:
|
CVSFI_Samples | The number of samples. |
CVSFI_Lines | The number of lines. |
CVSFI_Bands | The number of bands. |
CVSFI_DataType | Envi data type (not CVB data type!), see also https://www.l3harrisgeospatial.com/docs/enviheaderfiles.html: |
CVSFI_ByteOrder | Byte order
|
CVSFI_FileType | File type: Default value: "ENVI Standard" |
CVSFI_HeaderOffset | Header offset in bytes Number of bytes to skip when reading the ENVI-binary file |
CVSFI_Wavelength | Array of wavelengths with the unit given in CVSFI_WavelengthUnit. |
CVSFI_WavelengthUnit | Wavelength unit
|
CVSFI_Fwhm | Array of Full-width-half-maximum values The same unit as in CVSFI_WavelengthUnit |
enum CVSFieldType |
Data Type of a field.
cvbres_t CVSCreateMetaData | ( | CVSMETADATA & | MetaData | ) |
Creates an empty meta data handle.
An empty meta data Handle is created. All mandatory ENVI fields are initialized with the following default values CVSFI_Interleave = BandInterleavedByLine CVSFI_Samples = 0 CVSFI_Lines = 0 CVSFI_Bands = 0 CVSFI_DataType = 0 CVSFI_ByteOrder = 0 CVSFI_FileType = ENVI Standard CVSFI_HeaderOffset = 0
[out] | MetaData | Meta data handle |
cvbres_t CVSMetaDataAddToFloatArray | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
double | Element | ||
) |
Append a double element to a MetaData field of type double array.
Field needs to be undefined or have the suitable data type Call CVSMetaDataClearField to clear field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | Element | Double element to add to field of type double array |
cvbres_t CVSMetaDataAddToIntegerArray | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbint64_t | Element | ||
) |
Append an integer element to a MetaData field of type integer array.
Field needs to be undefined or have the suitable data type Call CVSMetaDataClearField to clear field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | Element | Integer element to add to field of type integer array |
cvbres_t CVSMetaDataAddToStringArray | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
const char * | String | ||
) |
Append a string element to a meta data field of type string array.
Field needs to be undefined or have the suitable data type Call CVSMetaDataClearField to clear field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | String | String Element to add to field of type string array |
cvbres_t CVSMetaDataAddToStringArrayW | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
const wchar_t * | String | ||
) |
Append a wstring element to a meta data field of type wstring array.
Field needs to be undefined or have the suitable data type Call CVSMetaDataClearField to clear field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | String | WString Element to add to field of type wstring array |
cvbres_t CVSMetaDataClearField | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum | ||
) |
Clears the specified field.
The specified field is cleared. Afterwards this field is undefined
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
cvbres_t CVSMetaDataGetArraySize | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
size_t & | NumberOfElements | ||
) |
Retrieves the array size of a field.
In case that field does not contain an array the number of elements is set to 0
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[out] | NumberOfElements | Number of elements in that field |
cvbres_t CVSMetaDataGetAsFloat | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
double & | Value | ||
) |
Retrieve a field value as double.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[out] | Value | Field value as double |
cvbres_t CVSMetaDataGetAsFloatArray | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbval_t | ElementIndex, | ||
double & | Element | ||
) |
Retrieves a double element from an array in a meta data field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | ElementIndex | Index of the double array in the range [0, CVSMetaDataGetArraySize[ |
[out] | Element | Element of the double array at given index |
cvbres_t CVSMetaDataGetAsInteger | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbint64_t & | Value | ||
) |
Retrieve a field value as integer.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[out] | Value | Field value as integer |
cvbres_t CVSMetaDataGetAsIntegerArray | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbval_t | ElementIndex, | ||
cvbint64_t & | Element | ||
) |
Retrieves an integer element from an array in a meta data field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | ElementIndex | Index of the int array in the range [0, CVSMetaDataGetArraySize[ |
[out] | Element | Element of the int array at given index |
cvbres_t CVSMetaDataGetAsString | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
char * | Value, | ||
size_t & | ValueSize | ||
) |
Retrieve a field value as string.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in,out] | Value | Field value as char array. To get the array size, set Value to nullptr |
[in,out] | ValueSize | Size of the char array. To get the array size, set Value to nullptr |
cvbres_t CVSMetaDataGetAsStringArray | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbval_t | ElementIndex, | ||
char * | String, | ||
size_t & | StringLength | ||
) |
Retrieves a string element of a meta data field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | ElementIndex | Index of the string array in the range [0, CVSMetaDataGetArraySize[ |
[out] | String | This pointer to pointer holds an array of strings. The user has to allocate char-pointer array and then to allocate char array. |
[in,out] | StringLength | This array contains the size in the string array. To get ElementSize pass Array as nullptr and allocate the suitable space for ElementSize using CVSMetaDataGetArraySize |
cvbres_t CVSMetaDataGetAsStringArrayW | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbval_t | ElementIndex, | ||
wchar_t * | String, | ||
size_t & | StringLength | ||
) |
Retrieves a wstring element of a meta data field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Enum to address a field in MetaData |
[in] | ElementIndex | Index of the wstring array in the range [0, CVSMetaDataGetArraySize[ |
[in,out] | String | Element as allocated wchar array. To get the wstring size of the field element, set Element to NULL |
[in,out] | StringLength | Size of the allocated wstring element. To get the wstring size of the field element, set Element to NULL |
cvbres_t CVSMetaDataGetAsStringW | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
wchar_t * | Value, | ||
size_t & | ValueSize | ||
) |
Retrieve a field value as wstring.
[in] | MetaData | handle |
[in] | FieldEnum | Field index |
[in,out] | Value | Field value as wchar array. To get the array size, set Value to nullptr |
[in,out] | ValueSize | Size of the allocated wchar array. To get the array size, set Value to nullptr |
cvbres_t CVSMetaDataGetFieldnameAsString | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
char * | FieldName, | ||
size_t & | FieldNameSize | ||
) |
Retrieve the field name as string.
The field name is used when exporting or importing the meta data eg. in the ENVI-format
[in] | MetaData | handle |
[in] | FieldEnum | Enum to address a field in MetaData |
[in,out] | FieldName | Field name as char array. To get the array size of field name set FieldName to nullptr |
[in,out] | FieldNameSize | Size of the allocated field name char array. To get the array size of field name set FieldName to nullptr |
cvbres_t CVSMetaDataGetFieldnameAsStringW | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
wchar_t * | FieldName, | ||
size_t & | FieldNameSize | ||
) |
Retrieve the field name as wstring.
The field name is used when exporting or importing the meta data
[in] | MetaData | handle |
[in] | FieldEnum | Enum to address a field in MetaData |
[in,out] | FieldName | Field name as wchar array. To get the array size of field name set FieldName to nullptr |
[in,out] | FieldNameSize | Size of the allocated field name wchar array. To get the array size of field name set FieldName to nullptr |
cvbres_t CVSMetaDataGetFieldType | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
CVSFieldType & | Type | ||
) |
Get data type of meta data field.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Enum to address a field in MetaData |
[out] | Type | Enum containing the data type of the field |
cvbres_t CVSMetaDataGetNumberOfFields | ( | CVSMETADATA | MetaData, |
size_t & | NumberOfFields | ||
) |
Get the total number of fields.
Returns the number of all fields. Fields which are not defined are counted as well
[in] | MetaData | Meta data handle |
[out] | NumberOfFields | Maximum number of fields in the MetaData handle |
cvbres_t CVSMetaDataIsFieldDefined | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbbool_t & | IsDefined | ||
) |
Check if a field is defined.
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Enum to address a field in MetaData |
[out] | IsDefined | true if field is defined, false if field is undefined |
cvbres_t CVSMetaDataSetAsFloat | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
double | Value | ||
) |
Set meta data field as double.
Any previous value of the field is discarded
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | Value | Double value |
cvbres_t CVSMetaDataSetAsInteger | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
cvbint64_t | Value | ||
) |
Set a meta data field as integer.
Any previous value of the field is discarded
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | Value | Integer value |
cvbres_t CVSMetaDataSetAsString | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
const char * | Value | ||
) |
Set meta data field as string.
Any previous value of the field is discarded
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | Value | string value |
cvbres_t CVSMetaDataSetAsStringW | ( | CVSMETADATA | MetaData, |
CVSField | FieldEnum, | ||
const wchar_t * | Value | ||
) |
Set meta data field as wstring.
Any previous value of the field is discarded
[in] | MetaData | Meta data handle |
[in] | FieldEnum | Field index |
[in] | Value | wstring value |