RAVE
|
Generic field that only provides a 2-dim data field and a number of dynamic attributes. More...
#include "rave_object.h"
#include "rave_types.h"
#include "rave_attribute.h"
#include "rave_list.h"
#include "raveobject_list.h"
#include "rave_data2d.h"
#include "lazy_dataset.h"
Go to the source code of this file.
Typedefs | |
typedef struct _RaveField_t | RaveField_t |
Defines a Rave field. | |
Functions | |
int | RaveField_setData (RaveField_t *field, long xsize, long ysize, void *data, RaveDataType type) |
Sets the data in the rave field. | |
int | RaveField_setLazyDataset (RaveField_t *field, LazyDataset_t *lazyDataset) |
Sets a lazy dataset as data member. | |
int | RaveField_createData (RaveField_t *field, long xsize, long ysize, RaveDataType type) |
Creates a empty data field. | |
int | RaveField_setDatafield (RaveField_t *field, RaveData2D_t *datafield) |
Sets the rave data 2d field. | |
void * | RaveField_getData (RaveField_t *field) |
Returns a pointer to the internal data storage. | |
RaveData2D_t * | RaveField_getDatafield (RaveField_t *field) |
Returns the 2d field associated with this rave field. | |
int | RaveField_getValue (RaveField_t *field, long x, long y, double *v) |
Returns the value at the specified index. | |
int | RaveField_setValue (RaveField_t *field, long x, long y, double value) |
Sets the value at specified position. | |
int | RaveField_getConvertedValue (RaveField_t *field, long x, long y, double *v) |
Returns the converted value at the specified index. | |
long | RaveField_getXsize (RaveField_t *field) |
Returns the xsize / number of bins. | |
long | RaveField_getYsize (RaveField_t *field) |
Returns the ysize / number of rays. | |
RaveDataType | RaveField_getDataType (RaveField_t *field) |
Returns the data type. | |
int | RaveField_addAttribute (RaveField_t *field, RaveAttribute_t *attribute) |
Adds a rave attribute to the parameter. | |
int | RaveField_addAttributeVersion (RaveField_t *field, RaveAttribute_t *attribute, RaveIO_ODIM_Version version) |
Adds a rave attribute to the parameter. | |
RaveAttribute_t * | RaveField_getAttribute (RaveField_t *field, const char *name) |
Returns the rave attribute that is named accordingly. | |
int | RaveField_hasAttribute (RaveField_t *field, const char *name) |
Returns if the specified attribute exists. | |
RaveList_t * | RaveField_getAttributeNames (RaveField_t *field) |
Returns a list of attribute names. | |
RaveList_t * | RaveField_getAttributeNamesVersion (RaveField_t *field, RaveIO_ODIM_Version version) |
Returns a list of attribute names. | |
RaveObjectList_t * | RaveField_getAttributeValues (RaveField_t *field) |
Returns a list of attribute values that has been set for this field. | |
RaveObjectList_t * | RaveField_getAttributeValuesVersion (RaveField_t *field, RaveIO_ODIM_Version version) |
Returns a list of attribute values that has been set for this field and version. | |
RaveObjectList_t * | RaveField_getInternalAttributeValues (RaveField_t *field) |
Returns a reference to the internally stored attributes. | |
void | RaveField_removeAttributes (RaveField_t *field) |
Removes all attributes from the field. | |
int | RaveField_hasAttributeStringValue (RaveField_t *field, const char *name, const char *value) |
Checks if the field has the attribute named name that is of type string and has a matching value. | |
RaveField_t * | RaveField_concatX (RaveField_t *field, RaveField_t *other) |
Concatenates field with other horizontally and returns the new field. | |
int | RaveField_circshiftData (RaveField_t *field, int nx, int ny) |
Circular shift of the internal field in x & y dimension. | |
Variables | |
RaveCoreObjectType | RaveField_TYPE |
Type definition to use when creating a rave object. | |
Generic field that only provides a 2-dim data field and a number of dynamic attributes.
This object supports cloning.
typedef struct _RaveField_t RaveField_t |
Defines a Rave field.
int RaveField_addAttribute | ( | RaveField_t * | field, |
RaveAttribute_t * | attribute ) |
Adds a rave attribute to the parameter.
[in] | field | - self |
[in] | attribute | - the attribute |
int RaveField_addAttributeVersion | ( | RaveField_t * | field, |
RaveAttribute_t * | attribute, | ||
RaveIO_ODIM_Version | version ) |
Adds a rave attribute to the parameter.
NOTE! This method is usually only used internally.
[in] | field | - self |
[in] | attribute | - the attribute |
[in] | version | - the version of the attribute added |
int RaveField_circshiftData | ( | RaveField_t * | field, |
int | nx, | ||
int | ny ) |
Circular shift of the internal field in x & y dimension.
[in] | field | - the field to be shifted |
[in] | nx | - the number of steps to be shifted in x-direction. Can be both positive and negative |
[in] | ny | - the number of steps to be shifted in y-direction. Can be both positive and negative |
RaveField_t * RaveField_concatX | ( | RaveField_t * | field, |
RaveField_t * | other ) |
Concatenates field with other horizontally and returns the new field.
The fields and others y-dimension must be the same as well as the data type.
[in] | field | - self |
[in] | other | - the field to contatenate |
int RaveField_createData | ( | RaveField_t * | field, |
long | xsize, | ||
long | ysize, | ||
RaveDataType | type ) |
Creates a empty data field.
[in] | field | - self |
[in] | xsize | - the xsize |
[in] | ysize | - the ysize |
[in] | type | - the data type |
RaveAttribute_t * RaveField_getAttribute | ( | RaveField_t * | field, |
const char * | name ) |
Returns the rave attribute that is named accordingly.
[in] | field | - self |
[in] | name | - the name of the attribute |
RaveList_t * RaveField_getAttributeNames | ( | RaveField_t * | field | ) |
Returns a list of attribute names.
Release with @ref RaveList_freeAndDestroy.
[in] | field | - self |
RaveList_t * RaveField_getAttributeNamesVersion | ( | RaveField_t * | field, |
RaveIO_ODIM_Version | version ) |
Returns a list of attribute names.
Release with @ref RaveList_freeAndDestroy. NOTE! This method is usually only used internally.
[in] | field | - self |
[in] | version | - version requested |
RaveObjectList_t * RaveField_getAttributeValues | ( | RaveField_t * | field | ) |
Returns a list of attribute values that has been set for this field.
[in] | field | - self |
RaveObjectList_t * RaveField_getAttributeValuesVersion | ( | RaveField_t * | field, |
RaveIO_ODIM_Version | version ) |
Returns a list of attribute values that has been set for this field and version.
NOTE! This method is usually only used internally.
[in] | field | - self |
[in] | version | - version requested |
int RaveField_getConvertedValue | ( | RaveField_t * | field, |
long | x, | ||
long | y, | ||
double * | v ) |
Returns the converted value at the specified index.
Corresponds to getAttribute("what/offset") + getAttribute("what/gain") * getValue(x,y).
[in] | field | - self |
[in] | x | - the x-pos / bin index |
[in] | y | - the y-pos / ray index |
[out] | v | - the data at the specified index |
void * RaveField_getData | ( | RaveField_t * | field | ) |
Returns a pointer to the internal data storage.
[in] | field | - self |
RaveData2D_t * RaveField_getDatafield | ( | RaveField_t * | field | ) |
Returns the 2d field associated with this rave field.
Note, it is a clone so don't expect that any modifications will modify the rave fields data array.
[in] | field | - self |
RaveDataType RaveField_getDataType | ( | RaveField_t * | field | ) |
Returns the data type.
[in] | field | - self |
RaveObjectList_t * RaveField_getInternalAttributeValues | ( | RaveField_t * | field | ) |
Returns a reference to the internally stored attributes.
NOTE! This method is usually only used internally.
[in] | field | - self |
int RaveField_getValue | ( | RaveField_t * | field, |
long | x, | ||
long | y, | ||
double * | v ) |
Returns the value at the specified index.
[in] | field | - self |
[in] | x | - the x-pos / bin index |
[in] | y | - the y-pos / ray index |
[out] | v | - the data at the specified index |
long RaveField_getXsize | ( | RaveField_t * | field | ) |
Returns the xsize / number of bins.
[in] | field | - self |
long RaveField_getYsize | ( | RaveField_t * | field | ) |
Returns the ysize / number of rays.
[in] | field | - self |
int RaveField_hasAttribute | ( | RaveField_t * | field, |
const char * | name ) |
Returns if the specified attribute exists.
[in] | field | - self |
[in] | name | - the name of the attribute |
int RaveField_hasAttributeStringValue | ( | RaveField_t * | field, |
const char * | name, | ||
const char * | value ) |
Checks if the field has the attribute named name that is of type string and has a matching value.
[in] | field | - the field |
[in] | name | - the name of the attribute |
[in] | value | - the value of the attribute |
void RaveField_removeAttributes | ( | RaveField_t * | field | ) |
Removes all attributes from the field.
int RaveField_setData | ( | RaveField_t * | field, |
long | xsize, | ||
long | ysize, | ||
void * | data, | ||
RaveDataType | type ) |
Sets the data in the rave field.
[in] | field | - self |
[in] | xsize | - the xsize |
[in] | ysize | - the ysize |
[in] | data | - the data |
[in] | type | - the data type |
int RaveField_setDatafield | ( | RaveField_t * | field, |
RaveData2D_t * | datafield ) |
Sets the rave data 2d field.
This will create a clone from the provided data field.
[in] | field | - self |
[in] | datafield | - the data field to use (MAY NOT BE NULL) |
int RaveField_setLazyDataset | ( | RaveField_t * | field, |
LazyDataset_t * | lazyDataset ) |
Sets a lazy dataset as data member.
On any requests to receive data, the lazy dataset will be used to populate the internal data field.
[in] |
int RaveField_setValue | ( | RaveField_t * | field, |
long | x, | ||
long | y, | ||
double | value ) |
Sets the value at specified position.
[in] | field | - self |
[in] | x | - x coordinate |
[in] | y | - y coordinate |
[in] | value | - the value to be set at specified coordinate |
|
extern |
Type definition to use when creating a rave object.