RAVE
rave_transform.h File Reference

Transformation routines. More...

#include "rave_types.h"
#include "rave_proj.h"

Go to the source code of this file.

Classes

struct  RaveTransform2D
 Data structure when working with 2D projections. More...
 
struct  RaveWeight2D
 Weight for one item. More...
 
struct  TransformWeight
 All weights that should be used for calculating a value of a position. More...
 
struct  RavePolarField
 Defines one field in a volume. More...
 
struct  RavePolarVolume
 Defines one polar volume. More...
 

Functions

double get_array_item_2d (unsigned char *data, int x, int y, RaveDataType type, int stride_xsize)
 Gets the value at position x,y from the data field.
 
void set_array_item_2d (unsigned char *data, int x, int y, double v, RaveDataType type, int stride_xsize)
 Sets the value at position x,y in the data field.
 
double get_array_item_3d (RavePolarVolume *pvol, int e, int r, int a)
 Gets a value from a polar volume.
 
void set_array_item_3d (RavePolarVolume *pvol, int e, int r, int a, double v)
 Sets a value in a polar volume.
 
TransformWeightinit_tw (int noi)
 Creates a TransformWeight struct with noi number of weights allocated.
 
void free_tw (TransformWeight *v)
 Deallocates the whole TransformWeight struct v, including the weights allocated.
 
TransformWeightget_nearest_weights_2d (int x, int y, UV here_s, RaveTransform2D *tw)
 Gets the weight for the pixel closest to here_s and .
 
TransformWeightget_bilinear_weights_2d (int x, int y, UV here_s, RaveTransform2D *tw)
 Gets the bilinear weights for the pixel surrounding here_s.
 
TransformWeightget_cubic_weights_2d (int x, int y, UV here_s, RaveTransform2D *tw)
 Gets the cubic weights for the pixel surrounding here_s.
 
TransformWeightget_cressman_weights_2d (int x, int y, UV here_s, RaveTransform2D *tw)
 Gets the cressman weights for the pixel surrounding here_s.
 
TransformWeightget_weights_2d (int x, int y, UV here_s, RaveTransform2D *tw)
 Gets the appropriate weights for the current algorithm and position.
 
double compute_weights_2d (TransformWeight *tw)
 Evaluates the weights specified in the TransformWeight struct, the weights will be normalized within the function by dividing the given weight with the total_wsum attribute in the TransformWeight struct.
 

Detailed Description

Transformation routines.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-08-05

Function Documentation

◆ compute_weights_2d()

double compute_weights_2d ( TransformWeight * tw)

Evaluates the weights specified in the TransformWeight struct, the weights will be normalized within the function by dividing the given weight with the total_wsum attribute in the TransformWeight struct.

Parameters
[in]twthe transformation weight(s)
Returns
the computed value

◆ free_tw()

void free_tw ( TransformWeight * v)

Deallocates the whole TransformWeight struct v, including the weights allocated.

Parameters
[in]vthe structure to be deallocated

◆ get_array_item_2d()

double get_array_item_2d ( unsigned char * data,
int x,
int y,
RaveDataType type,
int stride_xsize )

Gets the value at position x,y from the data field.

Parameters
[in]datathe data array
[in]xthe x position
[in]ythe y position
[in]typethe type of the data
[in]stride_xsizethe stride

◆ get_array_item_3d()

double get_array_item_3d ( RavePolarVolume * pvol,
int e,
int r,
int a )

Gets a value from a polar volume.

Parameters
[in]pvolthe polar volume
[in]ethe elevation
[in]rthe range bin
[in]athe azimuth
Returns
the value at the specified position

◆ get_bilinear_weights_2d()

TransformWeight * get_bilinear_weights_2d ( int x,
int y,
UV here_s,
RaveTransform2D * tw )

Gets the bilinear weights for the pixel surrounding here_s.

Parameters
[in]xposition in the out projection (only used for debugging)
[in]yposition in the out projection (only used for debugging)
[in]here_sthe pixel
[in]twthe transformation structure
Returns
the weight(s)

◆ get_cressman_weights_2d()

TransformWeight * get_cressman_weights_2d ( int x,
int y,
UV here_s,
RaveTransform2D * tw )

Gets the cressman weights for the pixel surrounding here_s.

Parameters
[in]xposition in the out projection (only used for debugging)
[in]yposition in the out projection (only used for debugging)
[in]here_sthe pixel
[in]twthe transformation structure
Returns
the weight(s)

◆ get_cubic_weights_2d()

TransformWeight * get_cubic_weights_2d ( int x,
int y,
UV here_s,
RaveTransform2D * tw )

Gets the cubic weights for the pixel surrounding here_s.

Parameters
[in]xposition in the out projection (only used for debugging)
[in]yposition in the out projection (only used for debugging)
[in]here_sthe pixel
[in]twthe transformation structure
Returns
the weight(s)

◆ get_nearest_weights_2d()

TransformWeight * get_nearest_weights_2d ( int x,
int y,
UV here_s,
RaveTransform2D * tw )

Gets the weight for the pixel closest to here_s and .

Parameters
[in]xposition in the out projection (only used for debugging)
[in]yposition in the out projection (only used for debugging)
[in]here_sthe pixel
[in]twthe transformation structure
Returns
the weight(s)

◆ get_weights_2d()

TransformWeight * get_weights_2d ( int x,
int y,
UV here_s,
RaveTransform2D * tw )

Gets the appropriate weights for the current algorithm and position.

Parameters
[in]xposition in the out projection (only used for debugging)
[in]yposition in the out projection (only used for debugging)
[in]here_sthe pixel
[in]twthe transformation structure.
Returns
the weight(s)

◆ init_tw()

TransformWeight * init_tw ( int noi)

Creates a TransformWeight struct with noi number of weights allocated.

Parameters
[in]noithe number of weights to be allocated
Returns
a TransformWeight struct with an array of weights allocated

◆ set_array_item_2d()

void set_array_item_2d ( unsigned char * data,
int x,
int y,
double v,
RaveDataType type,
int stride_xsize )

Sets the value at position x,y in the data field.

Parameters
[in]datathe data array
[in]xthe x position
[in]ythe y position
[in]vthe value that will be converted into the specified type
[in]typethe type of the data
[in]stride_xsizethe stride

◆ set_array_item_3d()

void set_array_item_3d ( RavePolarVolume * pvol,
int e,
int r,
int a,
double v )

Sets a value in a polar volume.

Parameters
[in]pvolthe polar volume
[in]ethe elevation
[in]rthe range bin
[in]athe azimuth
[in]vthe value to be set