CVBpy 14.1
MetaData Class Reference

Spectral MetaData object. More...

Inherits object.

Public Member Functions

None clear_field (self, int field_id)
 Clears the given field and sets the FieldType to FieldType.Invalid. More...
 
str field_name_as_string (self, int field_id)
 Gets the field name as string. More...
 
int field_type (self, int field_id)
 Gets the type of the given field. More...
 
bool is_field_defined (self, int field_id)
 Checks if the given field is already defined. More...
 
Union[str, float, int, List[str], List[int], List[float]] read_field (self, int field_id)
 Gets the value of the field. More...
 
None write_field (self, int field_id, Union[str, float, int, List[str], List[int], List[float]] value)
 Sets the value of a given field. More...
 

Properties

 bands = property
 int: Number of bands as defined in this object.
 
 interleaved_type = property
 int: View perspective as defined in this object (see cvb.spectral.CubeEncoding).
 
 lines = property
 int: Number of lines as defined in this object.
 
 number_of_fields = property
 int: Gets the total number of all fields, including undefined ones.
 
 samples = property
 int: Number of samples as defined in this object.
 
 wavelengths = property
 List[float]: Wavelengths as defined in this object.
 

Detailed Description

Spectral MetaData object.

Creates an empty metadata object.

Member Function Documentation

◆ clear_field()

None clear_field (   self,
int  field_id 
)

Clears the given field and sets the FieldType to FieldType.Invalid.

Parameters

field_id : int Field to be addressed (see cvb.spectral.FieldID).

◆ field_name_as_string()

str field_name_as_string (   self,
int  field_id 
)

Gets the field name as string.

Parameters

field_id : int Field to be addressed (see cvb.spectral.FieldID).

Returns

str Field name like defined in the ENVI-format.

◆ field_type()

int field_type (   self,
int  field_id 
)

Gets the type of the given field.

Parameters

field_id : int Field to be addressed.

Returns

int Field type in case the field has already been defined. Otherwise cvb.spectral.FieldType.Invalid (see cvb.spectral.FieldType).

◆ is_field_defined()

bool is_field_defined (   self,
int  field_id 
)

Checks if the given field is already defined.

Parameters

field_id : int Field to be addressed (see cvb.spectral.FieldID).

Returns

bool True if field is defined, False otherwise.

◆ read_field()

Union[str, float, int, List[str], List[int], List[float]] read_field (   self,
int  field_id 
)

Gets the value of the field.

Parameters

field_id : int Field to be addressed (see cvb.spectral.FieldID).

Returns

Union[str, float, int, List[str], List[int], List[float]] Value of field.

◆ write_field()

None write_field (   self,
int  field_id,
Union[str, float, int, List[str], List[int], List[float]]  value 
)

Sets the value of a given field.

Parameters

field_id : int Field to be addressed (see cvb.spectral.FieldID).

value : Union[str, float, int, List[str], List[int], List[float]] The new value.