ROPO
Loading...
Searching...
No Matches
rave_fmi_image.h File Reference
#include "fmi_image.h"
#include "rave_object.h"
#include "polarvolume.h"
#include "polarscan.h"
#include "rave_field.h"
Include dependency graph for rave_fmi_image.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _RaveFmiImage_t RaveFmiImage_t
 

Functions

int RaveFmiImage_initialize (RaveFmiImage_t *self, int width, int height)
 
void RaveFmiImage_fill (RaveFmiImage_t *self, unsigned char v)
 
void RaveFmiImage_fillOriginal (RaveFmiImage_t *self, double v)
 
FmiImageRaveFmiImage_getImage (RaveFmiImage_t *self)
 
PolarScan_t * RaveFmiImage_toPolarScan (RaveFmiImage_t *self, const char *quantity, int datatype)
 
RaveField_t * RaveFmiImage_toRaveField (RaveFmiImage_t *self, int datatype)
 
int RaveFmiImage_addAttribute (RaveFmiImage_t *self, RaveAttribute_t *attribute)
 
RaveAttribute_t * RaveFmiImage_getAttribute (RaveFmiImage_t *self, const char *name)
 
RaveList_t * RaveFmiImage_getAttributeNames (RaveFmiImage_t *self)
 
void RaveFmiImage_setGain (RaveFmiImage_t *self, double gain)
 
double RaveFmiImage_getGain (RaveFmiImage_t *self)
 
void RaveFmiImage_setOffset (RaveFmiImage_t *self, double offset)
 
double RaveFmiImage_getOffset (RaveFmiImage_t *self)
 
void RaveFmiImage_setNodata (RaveFmiImage_t *self, double v)
 
double RaveFmiImage_getNodata (RaveFmiImage_t *self)
 
void RaveFmiImage_setUndetect (RaveFmiImage_t *self, double v)
 
double RaveFmiImage_getUndetect (RaveFmiImage_t *self)
 
void RaveFmiImage_setOriginalGain (RaveFmiImage_t *self, double gain)
 
double RaveFmiImage_getOriginalGain (RaveFmiImage_t *self)
 
void RaveFmiImage_setOriginalOffset (RaveFmiImage_t *self, double offset)
 
double RaveFmiImage_getOriginalOffset (RaveFmiImage_t *self)
 
void RaveFmiImage_setOriginalNodata (RaveFmiImage_t *self, double v)
 
double RaveFmiImage_getOriginalNodata (RaveFmiImage_t *self)
 
void RaveFmiImage_setOriginalUndetect (RaveFmiImage_t *self, double v)
 
double RaveFmiImage_getOriginalUndetect (RaveFmiImage_t *self)
 
RaveFmiImage_tRaveFmiImage_new (int width, int height)
 
RaveFmiImage_tRaveFmiImage_fromPolarVolume (PolarVolume_t *volume, int scannr, const char *quantity)
 
RaveFmiImage_tRaveFmiImage_fromPolarScan (PolarScan_t *scan, const char *quantity)
 
RaveFmiImage_tRaveFmiImage_fromRaveField (RaveField_t *field)
 
RaveFmiImage_tRaveFmiImage_fromRave (RaveCoreObject *object, const char *quantity)
 

Variables

RaveCoreObjectType RaveFmiImage_TYPE
 

Detailed Description

rave object wrapper for the fmi_image. This object support #RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2011-08-31

Definition in file rave_fmi_image.h.

Typedef Documentation

◆ RaveFmiImage_t

Defines a RaveFmiImage

Definition at line 38 of file rave_fmi_image.h.

Function Documentation

◆ RaveFmiImage_addAttribute()

int RaveFmiImage_addAttribute ( RaveFmiImage_t * self,
RaveAttribute_t * attribute )

Adds a rave attribute to the image.

Parameters
[in]self- self
[in]attribute- the attribute
Returns
1 on success otherwise 0

Definition at line 587 of file rave_fmi_image.c.

◆ RaveFmiImage_fill()

void RaveFmiImage_fill ( RaveFmiImage_t * self,
unsigned char v )

Fills the image with the provided value.

Parameters
[in]self- self
[in]v- the pixel value to set for all pixels

Definition at line 480 of file rave_fmi_image.c.

◆ RaveFmiImage_fillOriginal()

void RaveFmiImage_fillOriginal ( RaveFmiImage_t * self,
double v )

Fills the original image with the provided value.

Parameters
[in]self- self
[in]v- the pixel value to set for all pixels

Definition at line 494 of file rave_fmi_image.c.

◆ RaveFmiImage_fromPolarScan()

RaveFmiImage_t * RaveFmiImage_fromPolarScan ( PolarScan_t * scan,
const char * quantity )

Creates a fmi image from a polar scan

Parameters
[in]scan- the polar scan
[in]quantity- the quantity to use for building the fmi image (NULL == default parameter)
Returns
the object on success otherwise NULL

Definition at line 779 of file rave_fmi_image.c.

◆ RaveFmiImage_fromPolarVolume()

RaveFmiImage_t * RaveFmiImage_fromPolarVolume ( PolarVolume_t * volume,
int scannr,
const char * quantity )

Creates a fmi image from a specific scan in a polar volume

Parameters
[in]volume- the polar volume
[in]scannr- the polar scan in the volume
[in]quantity- the quantity to use for building the fmi image (NULL == default parameter)
Returns
the object on success otherwise NULL

Definition at line 738 of file rave_fmi_image.c.

◆ RaveFmiImage_fromRave()

RaveFmiImage_t * RaveFmiImage_fromRave ( RaveCoreObject * object,
const char * quantity )

Creates a fmi image from a rave object. Currently supported object types are. PolarVolume_t, PolarScan_t and RaveField_t. If it is a polar volume scan 0 is assumed.

Parameters
[in]object- the object to generate an fmi image from
[in]quantity- the specific quantity (NULL == default parameter if applicable)
Returns
the object on success otherwise NULL

Definition at line 829 of file rave_fmi_image.c.

◆ RaveFmiImage_fromRaveField()

RaveFmiImage_t * RaveFmiImage_fromRaveField ( RaveField_t * field)

Creates a fmi image from a rave field

Parameters
[in]field- the rave field
Returns
the object on success otherwise NULL

Definition at line 805 of file rave_fmi_image.c.

◆ RaveFmiImage_getAttribute()

RaveAttribute_t * RaveFmiImage_getAttribute ( RaveFmiImage_t * self,
const char * name )

Returns the rave attribute that is named accordingly.

Parameters
[in]self- self
[in]name- the name of the attribute
Returns
the attribute if found otherwise NULL

Definition at line 615 of file rave_fmi_image.c.

◆ RaveFmiImage_getAttributeNames()

RaveList_t * RaveFmiImage_getAttributeNames ( RaveFmiImage_t * self)

Returns a list of attribute names. Release with @ref #RaveList_freeAndDestroy.

Parameters
[in]self- self
Returns
a list of attribute names

Definition at line 625 of file rave_fmi_image.c.

◆ RaveFmiImage_getGain()

double RaveFmiImage_getGain ( RaveFmiImage_t * self)

Returns the gain for the data in the image Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
Returns
the gain

Definition at line 637 of file rave_fmi_image.c.

◆ RaveFmiImage_getImage()

FmiImage * RaveFmiImage_getImage ( RaveFmiImage_t * self)

Returns the internal FmiImage.

Parameters
[in]self- self
Returns
the internal fmi image (NOTE, THIS IS AN INTERNAL POINTER SO DO NOT RELEASE)

Definition at line 508 of file rave_fmi_image.c.

◆ RaveFmiImage_getNodata()

double RaveFmiImage_getNodata ( RaveFmiImage_t * self)

Returns the nodata for the data in the image

Parameters
[in]self- self
Returns
the nodata value

Definition at line 661 of file rave_fmi_image.c.

◆ RaveFmiImage_getOffset()

double RaveFmiImage_getOffset ( RaveFmiImage_t * self)

Returns the offset for the data in the image. Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
Returns
the offset

Definition at line 649 of file rave_fmi_image.c.

◆ RaveFmiImage_getOriginalGain()

double RaveFmiImage_getOriginalGain ( RaveFmiImage_t * self)

Returns the original (when converted from rave object) gain for the data in the image Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
Returns
the gain

Definition at line 685 of file rave_fmi_image.c.

◆ RaveFmiImage_getOriginalNodata()

double RaveFmiImage_getOriginalNodata ( RaveFmiImage_t * self)

Returns the original (when converted from rave object) nodata for the data in the image

Parameters
[in]self- self
Returns
the nodata value

Definition at line 709 of file rave_fmi_image.c.

◆ RaveFmiImage_getOriginalOffset()

double RaveFmiImage_getOriginalOffset ( RaveFmiImage_t * self)

Returns the original (when converted from rave object) offset for the data in the image. Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
Returns
the offset

Definition at line 697 of file rave_fmi_image.c.

◆ RaveFmiImage_getOriginalUndetect()

double RaveFmiImage_getOriginalUndetect ( RaveFmiImage_t * self)

Returns the original (when converted from rave object)undetect for the data in the image.

Parameters
[in]self- self
Returns
the undetect value

Definition at line 721 of file rave_fmi_image.c.

◆ RaveFmiImage_getUndetect()

double RaveFmiImage_getUndetect ( RaveFmiImage_t * self)

Returns the undetect for the data in the image.

Parameters
[in]self- self
Returns
the undetect value

Definition at line 673 of file rave_fmi_image.c.

◆ RaveFmiImage_initialize()

int RaveFmiImage_initialize ( RaveFmiImage_t * self,
int width,
int height )

Initializes the rave image with the specific width and height.

See also
RaveFmiImage_new for short cut version
Parameters
[in]self- self
[in]width- width
[in]height- height
Returns
1 on success otherwise 0

Definition at line 459 of file rave_fmi_image.c.

◆ RaveFmiImage_new()

RaveFmiImage_t * RaveFmiImage_new ( int width,
int height )

Creates a rave fmi image with specified dimension

Parameters
[in]width- the width
[in]height- the height
Returns
the fmi image on success otherwise NULL

Definition at line 727 of file rave_fmi_image.c.

◆ RaveFmiImage_setGain()

void RaveFmiImage_setGain ( RaveFmiImage_t * self,
double gain )

Sets the gain for the data in the image. Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
[in]gain- the gain

Definition at line 631 of file rave_fmi_image.c.

◆ RaveFmiImage_setNodata()

void RaveFmiImage_setNodata ( RaveFmiImage_t * self,
double v )

Sets the nodata for the data in the image.

Parameters
[in]self- self
[in]v- the nodata value

Definition at line 655 of file rave_fmi_image.c.

◆ RaveFmiImage_setOffset()

void RaveFmiImage_setOffset ( RaveFmiImage_t * self,
double offset )

Sets the gain for the data in the image Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
[in]offset- the offset

Definition at line 643 of file rave_fmi_image.c.

◆ RaveFmiImage_setOriginalGain()

void RaveFmiImage_setOriginalGain ( RaveFmiImage_t * self,
double gain )

Sets the original (when converted from rave object) gain for the data in the image. Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
[in]gain- the gain

Definition at line 679 of file rave_fmi_image.c.

◆ RaveFmiImage_setOriginalNodata()

void RaveFmiImage_setOriginalNodata ( RaveFmiImage_t * self,
double v )

Sets the original (when converted from rave object) nodata for the data in the image.

Parameters
[in]self- self
[in]v- the nodata value

Definition at line 703 of file rave_fmi_image.c.

◆ RaveFmiImage_setOriginalOffset()

void RaveFmiImage_setOriginalOffset ( RaveFmiImage_t * self,
double offset )

Sets the original (when converted from rave object) gain for the data in the image Data stored to actual value is retrieved by offset + value * gain.

Parameters
[in]self- self
[in]offset- the offset

Definition at line 691 of file rave_fmi_image.c.

◆ RaveFmiImage_setOriginalUndetect()

void RaveFmiImage_setOriginalUndetect ( RaveFmiImage_t * self,
double v )

Sets the original (when converted from rave object)undetect for the data in the image

Parameters
[in]self- self
[in]v- the undetect value

Definition at line 715 of file rave_fmi_image.c.

◆ RaveFmiImage_setUndetect()

void RaveFmiImage_setUndetect ( RaveFmiImage_t * self,
double v )

Sets the undetect for the data in the image

Parameters
[in]self- self
[in]v- the undetect value

Definition at line 667 of file rave_fmi_image.c.

◆ RaveFmiImage_toPolarScan()

PolarScan_t * RaveFmiImage_toPolarScan ( RaveFmiImage_t * self,
const char * quantity,
int datatype )

Creates a polar scan from a fmi image

Parameters
[in]self- self
[in]quantity- the quantity to be set for the parameters (may be NULL)
[in]datatype- how the data field should be defined. 0 = same as when created, 1 = force unsigned char and use data from 8 bit array, 2 = force unsigned char but use data from original data array
Returns
a polar volume on success otherwise NULL

Definition at line 514 of file rave_fmi_image.c.

◆ RaveFmiImage_toRaveField()

RaveField_t * RaveFmiImage_toRaveField ( RaveFmiImage_t * self,
int datatype )

Creates a rave field from a fmi image

Parameters
[in]self- self
[in]datatype- how the data field should be defined. 0 = same as when created, 1 = force unsigned char and use data from 8 bit array, 2 = force unsigned char but use data from original data array
Returns
a polar volume on success otherwise NULL

Definition at line 550 of file rave_fmi_image.c.

Variable Documentation

◆ RaveFmiImage_TYPE

RaveCoreObjectType RaveFmiImage_TYPE
extern

Type definition to use when creating a rave object.

Definition at line 845 of file rave_fmi_image.c.