ocssw  1.0
Typedefs | Functions
/disk01/web/ocssw/build/inc/meris/epr_band.h File Reference

(r8090/r7671)

#include "epr_ptrarray.h"
#include <stdio.h>

Go to the source code of this file.

Typedefs

typedef void(* EPR_FLineDecoder )(void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
typedef void(* EPR_FArrayTransformer )(void *sourceArray, EPR_SBandId *band_id, float *raster_buffer, epr_uint nel)

Functions

EPR_EScalingMethod epr_str_to_scaling_method (const char *str)
EPR_ESampleModel epr_str_to_sample_offset (const char *str)
EPR_SDatasetRef epr_get_ref_struct (EPR_SProductId *product_id, const char *str)
float epr_get_scaling_factor (EPR_SProductId *product_id, const char *str)
float epr_get_scaling_params (EPR_SProductId *product_id, const char *str)
int epr_read_band_measurement_data (EPR_SBandId *band_id, int offset_x, int offset_y, EPR_SRaster *raster)
int epr_read_band_annotation_data (EPR_SBandId *band_id, int offset_x, int offset_y, EPR_SRaster *raster)
float epr_interpolate2D (float wi, float wj, float x00, float x10, float x01, float x11)
void decode_tiepoint_band (float *sa_beg, float *sa_end, epr_uint samples_per_tie_pt, epr_uint num_elems, EPR_SBandId *band_id, int xo, float scan_offset_x, float y_mod, int raster_width, int s_x, float *raster_buffer, int raster_pos)
EPR_FLineDecoder select_line_decode_function (EPR_EDataTypeId band_daty, EPR_ESampleModel band_smod, EPR_EDataTypeId daty_id)
EPR_FArrayTransformer select_transform_array_function (EPR_EDataTypeId band_daty, EPR_EDataTypeId daty_id)
void epr_zero_invalid_pixels (EPR_SRaster *raster, EPR_SRaster *bm_raster)
void epr_free_band_id (EPR_SBandId *band_id)
EPR_SPtrArray * epr_create_band_ids (EPR_SProductId *product_id)
void decode_line_uchar_1_of_1_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_ushort_1_of_1_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_short_1_of_1_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_short_1_of_2_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_short_2_of_2_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_char_1_of_1_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_1_of_1_to_uchar (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_1_of_2_to_uchar (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_2_of_2_to_uchar (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_ushort_1_of_1_to_ushort (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_1_of_2_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_2_of_2_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_2_to_f_to_float (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void decode_line_uchar_3_to_i_to_uint (void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)
void transform_array_short_to_float (void *sourceArray, EPR_SBandId *band_id, float *raster_buffer, epr_uint nel)
void transform_array_ushort_to_float (void *sourceArray, EPR_SBandId *band_id, float *raster_buffer, epr_uint nel)
void transform_array_int_to_float (void *sourceArray, EPR_SBandId *band_id, float *raster_buffer, epr_uint nel)
void transform_array_uint_to_float (void *sourceArray, EPR_SBandId *band_id, float *raster_buffer, epr_uint nel)
void mirror_float_array (float *raster_buffer, epr_uint raster_width, epr_uint raster_height)
void mirror_uchar_array (epr_uchar *raster_buffer, epr_uint raster_width, epr_uint raster_height)
void mirror_ushort_array (epr_ushort *raster_buffer, epr_uint raster_width, epr_uint raster_height)
void mirror_uint_array (epr_uint *raster_buffer, epr_uint raster_width, epr_uint raster_height)

Typedef Documentation

typedef void(* EPR_FArrayTransformer)(void *sourceArray, EPR_SBandId *band_id, float *raster_buffer, epr_uint nel)

Definition at line 222 of file epr_band.h.

typedef void(* EPR_FLineDecoder)(void *sourceArray, EPR_SBandId *band_id, int xo, int raster_width, int s_x, void *raster_buffer, int raster_pos)

Definition at line 209 of file epr_band.h.


Function Documentation

void decode_line_char_1_of_1_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1211 of file epr_band.c.

void decode_line_short_1_of_1_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1271 of file epr_band.c.

void decode_line_short_1_of_2_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1300 of file epr_band.c.

void decode_line_short_2_of_2_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1330 of file epr_band.c.

void decode_line_uchar_1_of_1_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

This group of functions is for scaling the field element for a physical measurement values.
The type is located in the field info.
One field must have one type only.

Parameters:
sourceArraythe sourse array identifier (to be scaled)
band_idthe band ID with the information about the field's physical properties
xo[PIXEL] X-coordinate (0-bazed) of the upper right corner raster to search
raster_width[PIXEL] the width of the raster is been research
s_xX-step to get the next raster to search
raster_buffer[BYTE] the memory buffer to save information was scaled
raster_posshows the point of filling of the array raster_buffer

Definition at line 1181 of file epr_band.c.

void decode_line_uchar_1_of_1_to_uchar ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1360 of file epr_band.c.

void decode_line_uchar_1_of_2_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1469 of file epr_band.c.

void decode_line_uchar_1_of_2_to_uchar ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1379 of file epr_band.c.

void decode_line_uchar_2_of_2_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1500 of file epr_band.c.

void decode_line_uchar_2_of_2_to_uchar ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1399 of file epr_band.c.

void decode_line_uchar_2_to_f_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1437 of file epr_band.c.

void decode_line_uchar_3_to_i_to_uint ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1529 of file epr_band.c.

void decode_line_ushort_1_of_1_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1241 of file epr_band.c.

void decode_line_ushort_1_of_1_to_ushort ( void *  sourceArray,
EPR_SBandId *  band_id,
int  xo,
int  raster_width,
int  s_x,
void *  raster_buffer,
int  raster_pos 
)

Definition at line 1418 of file epr_band.c.

void decode_tiepoint_band ( float *  sa_beg,
float *  sa_end,
epr_uint  samples_per_tie_pt,
epr_uint  num_elems,
EPR_SBandId *  band_id,
int  offset_x,
float  scan_offset_x,
float  y_mod,
int  raster_width,
int  s_x,
float *  raster_buffer,
int  raster_pos 
)

Computes the physical values for the annotation data.

Parameters:
sa_begthe float array of tie points "before" Y-coordinate of the point to search
sa_endthe float array of tie points "after" Y-coordinate of the point to search
samples_per_tie_ptthe "distance" between two neighbour tie point (in scan-line direction)
num_elemsnumber of elements in one tie point scan-line
band_idthe information about properties and quantities of ENVISAT data.
xo[PIXEL] X-coordinate (0-bazed) of the upper right corner raster to search
y_mod[PIXEL] relativ location of the point is been researched (in fly direction)
raster_width[PIXEL] the width of the raster is been researched
s_x[PIXEL] X-step to get the next point (in source coordinates) to search
raster_bufferthe float user array to be filled with physical values
raster_posthe actual "filled" position in raster_buffer-array

Computes the physical values for the annotation data.

Parameters:
sa_begthe float array of tie points "before" Y-coordinate of the point to search
sa_endthe float array of tie points "after" Y-coordinate of the point to search
samples_per_tie_ptthe "distance" between two neighbour tie points (in scan-line direction)
num_elemsnumber of elements in one tie point scan-line
band_idthe information about properties and quantities of ENVISAT data.
offset_x[PIXEL] X-coordinate (0-based) of the upper right raster corner to search
y_mod[PIXEL] relative location of the point is being searched for (in flight direction)
raster_width[PIXEL] the width of the raster is being searched for
s_x[PIXEL] X-step to get the next point (in source coordinates) to search
raster_bufferthe float user array to be filled with physical values
raster_posthe actual "filled" position in raster_buffer-array

Definition at line 1565 of file epr_band.c.

EPR_SPtrArray* epr_create_band_ids ( EPR_SProductId *  product_id)

Obtains all bands infos from the dddb.

Definition at line 43 of file epr_band.c.

void epr_free_band_id ( EPR_SBandId *  band_id)

Release the memory allocated through a band ID.

Parameters:
band_idthe band identifier to be released.

Release the memory allocated through a band ID.

Parameters:
bandthe dataset description identifier, if NULL the function immediately returns zero.
Returns:
zero for success, an error code otherwise

Definition at line 292 of file epr_band.c.

EPR_SDatasetRef epr_get_ref_struct ( EPR_SProductId *  product_id,
const char *  str 
)

Gets the dataset_id, field_index and elem_index

Parameters:
product_idthe the product file identifier
strthe string with the name, separator ('.') and indexes.
Returns:
the dataset_id, field_index and elem_index (-1 if no). NULL if correspondent dataset name was not found.

Definition at line 391 of file epr_band.c.

float epr_get_scaling_factor ( EPR_SProductId *  product_id,
const char *  str 
)

Gets the scaling factor by the given dataset_id, field_index, elem_index

Parameters:
product_idthe the product file identifier
strthe string with the name, separator ('.') and indexes.
Returns:
the dataset_id, field_index and elem_index (-1 if no). NULL if correspondent dataset name was not found.

Definition at line 360 of file epr_band.c.

float epr_get_scaling_params ( EPR_SProductId *  product_id,
const char *  str 
)

Gets the scaling params: factor or offset by the given dataset_id, field_index, elem_index

Parameters:
product_idthe the product file identifier
strthe string with the name, separator ('.') and indexes.
Returns:
the dataset_id, field_index and elem_index (-1 if no). NULL if correspondent dataset name was not found.

Definition at line 328 of file epr_band.c.

float epr_interpolate2D ( float  wi,
float  wj,
float  x00,
float  x10,
float  x01,
float  x11 
)

Two dimenzional interpolation

Parameters:
withe interpolation point location in [0,1] in "horizontal" direction
wjthe interpolation point location in [0,1] in "vertical" direction
x00the first point in "horizontal" direction
x10the second point in "horizontal" direction
x01the first point in "vertical" direction
x11the second point in "vertical" direction
Returns:
float interpolated value

Definition at line 1647 of file epr_band.c.

int epr_read_band_annotation_data ( EPR_SBandId *  band_id,
int  offset_x,
int  offset_y,
EPR_SRaster *  raster 
)

Reads the annotation data and converts its in physical values.

Parameters:
band_idthe information about properties and quantities of ENVISAT data.
offset_xX-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
offset_yY-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
rasterthe instance to the buffer information was used
Returns:
zero for success, and error code otherwise

Reads the annotation data and converts its into physical values.

Parameters:
band_idthe information about properties and quantities of ENVISAT data.
offset_xX-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
offset_yY-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
rasterthe instance to the buffer information was used
Returns:
zero for success, an error code otherwise

! was 0.5F !!

! was 0.5F !!

! EPR-7: was 0.5F !!

Definition at line 828 of file epr_band.c.

int epr_read_band_measurement_data ( EPR_SBandId *  band_id,
int  offset_x,
int  offset_y,
EPR_SRaster *  raster 
)

Reads the measurement data and converts its in physical values.

Parameters:
band_idthe information about properties and quantities of ENVISAT data.
offset_xX-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
offset_yY-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
rasterthe instance to the buffer information was used
Returns:
zero for success, and error code otherwise

Reads the measurement data and converts its into physical values.

Parameters:
band_idthe information about properties and quantities of ENVISAT data.
offset_xX-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
offset_yY-coordinate in pixel co-ordinates (zero-based) of the upper right corner raster to search
rasterthe instance to the buffer information was used
Returns:
zero for success, an error code otherwise

Definition at line 697 of file epr_band.c.

Converts the given string into a sample offset identifier.

Parameters:
strthe string to be converted.
Returns:
the sample offset identifier represented by the given string. If the string is equal of '*' the value e_none_samoff is returned.

Definition at line 456 of file epr_band.c.

Converts the given string into a scaling method identifier.

Parameters:
strthe string to be converted.
Returns:
the scaling method identifier represented by the given string. If the string is equal of '*' the value e_non_smid is returned.

Definition at line 437 of file epr_band.c.

void epr_zero_invalid_pixels ( EPR_SRaster *  raster,
EPR_SRaster *  bm_raster 
)

Masks the band information out. The band information will be masked dependent on bit mask filter for the same selected area (described in raster).

Parameters:
rasterselected and physically processed the ENVISAT product data band information
bm_rasterselected the ENVISAT flag bit mask filter

Definition at line 1760 of file epr_band.c.

void mirror_float_array ( float *  raster_buffer,
epr_uint  raster_width,
epr_uint  raster_height 
)

This group of functions is for mirroring the scaled line of a physical MERIS values.

Parameters:
raster_buffer[BYTE] the memory buffer to be Y-mirrored
raster_width[PIXEL] the width of the raster is been Y-mirrored
raster_height[PIXEL] the height of the raster is been Y-mirrored

Definition at line 1700 of file epr_band.c.

void mirror_uchar_array ( epr_uchar raster_buffer,
epr_uint  raster_width,
epr_uint  raster_height 
)

Definition at line 1715 of file epr_band.c.

void mirror_uint_array ( epr_uint raster_buffer,
epr_uint  raster_width,
epr_uint  raster_height 
)

Definition at line 1745 of file epr_band.c.

void mirror_ushort_array ( epr_ushort raster_buffer,
epr_uint  raster_width,
epr_uint  raster_height 
)

Definition at line 1730 of file epr_band.c.

Selects the line decode function, depended on measurement data type.

Definition at line 1096 of file epr_band.c.

Selects the transform array function, dependent on annotation data type.

Definition at line 1163 of file epr_band.c.

void transform_array_int_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
float *  raster_buffer,
epr_uint  nel 
)

Definition at line 1676 of file epr_band.c.

void transform_array_short_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
float *  raster_buffer,
epr_uint  nel 
)

This group of functions is for scaling the field element for a physical annotation values.
The type is located in the field info.
One field must have one type only.

Parameters:
sourceArraythe sourse array identifier (to be scaled)
band_idthe band ID with the information about the field's physical properties
raster_buffer[BYTE] the memory buffer to save information was scaled
nelnumber of element to scale

Definition at line 1652 of file epr_band.c.

void transform_array_uint_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
float *  raster_buffer,
epr_uint  nel 
)

Definition at line 1688 of file epr_band.c.

void transform_array_ushort_to_float ( void *  sourceArray,
EPR_SBandId *  band_id,
float *  raster_buffer,
epr_uint  nel 
)

Definition at line 1664 of file epr_band.c.