OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Collaboration diagram for Single Pixel Access:

Modules

 Bitmask
 
 Utility Functions
 

Functions

epr_uint epr_get_pixel_as_uint (const EPR_SRaster *raster, int x, int y)
 
int epr_get_pixel_as_int (const EPR_SRaster *raster, int x, int y)
 
float epr_get_pixel_as_float (const EPR_SRaster *raster, int x, int y)
 
double epr_get_pixel_as_double (const EPR_SRaster *raster, int x, int y)
 

Variables

EPR_Magic magic
 
char * file_path
 
FILE * istream
 
epr_uint tot_size
 
epr_uint scene_width
 
epr_uint scene_height
 
char id_string [EPR_PRODUCT_ID_STRLEN+1]
 
EPR_SRecord * mph_record
 
EPR_SRecord * sph_record
 
EPR_SPtrArray * dsd_array
 
EPR_SPtrArray * record_info_cache
 
EPR_SPtrArray * param_table
 
EPR_SPtrArray * dataset_ids
 
EPR_SPtrArray * band_ids
 
int meris_iodd_version
 
EPR_Magic magic
 
EPR_SProductId * product_id
 
char * dsd_name
 
const EPR_SDSD * dsd
 
char * dataset_name
 
const struct RecordDescriptorrecord_descriptor
 
EPR_SRecordInfo * record_info
 
char * description
 
EPR_Magic magic
 
int index
 
char * ds_name
 
char * ds_type
 
char * filename
 
epr_uint ds_offset
 
epr_uint ds_size
 
epr_uint num_dsr
 
epr_uint dsr_size
 
EPR_Magic magic
 
EPR_SRecordInfo * info
 
epr_uint num_fields
 
EPR_SField ** fields
 
EPR_Magic magic
 
EPR_SFieldInfo * info
 
void * elems
 
EPR_Magic magic
 
EPR_EDataTypeId data_type
 
epr_uint elem_size
 
epr_uint source_width
 
epr_uint source_height
 
epr_uint source_step_x
 
epr_uint source_step_y
 
epr_uint raster_width
 
epr_uint raster_height
 
void * buffer
 
EPR_SDatasetId * dataset_id
 
int field_index
 
int elem_index
 
EPR_Magic magic
 
char * name
 
epr_uint bit_mask
 
char * description
 
EPR_Magic magic
 
EPR_SProductId * product_id
 
char * band_name
 
int spectr_band_index
 
EPR_SDatasetRef dataset_ref
 
EPR_ESampleModel sample_model
 
EPR_EDataTypeId data_type
 
EPR_EScalingMethod scaling_method
 
float scaling_offset
 
float scaling_factor
 
char * bm_expr
 
EPR_SPtrArray * flag_coding
 
char * unit
 
char * description
 
epr_boolean lines_mirrored
 
int days
 
epr_uint seconds
 
epr_uint microseconds
 

Detailed Description

Function Documentation

◆ epr_get_pixel_as_double()

double epr_get_pixel_as_double ( const EPR_SRaster *  raster,
int  x,
int  y 
)

Definition at line 815 of file epr_bitmask.c.

◆ epr_get_pixel_as_float()

float epr_get_pixel_as_float ( const EPR_SRaster *  raster,
int  x,
int  y 
)

Definition at line 789 of file epr_bitmask.c.

◆ epr_get_pixel_as_int()

int epr_get_pixel_as_int ( const EPR_SRaster *  raster,
int  x,
int  y 
)

Definition at line 762 of file epr_bitmask.c.

◆ epr_get_pixel_as_uint()

epr_uint epr_get_pixel_as_uint ( const EPR_SRaster *  raster,
int  x,
int  y 
)

This group of functions is for getting the values of the elements of a raster (i.e. pixel) in a type-safe way.

Parameters
rasterthe raster which contains the pixel, must not be NULL
xthe (zero-based) X co-ordinate of the pixel
ythe (zero-based) Y co-ordinate of the pixel
Returns
the typed value at the given co-ordinate.

Definition at line 736 of file epr_bitmask.c.

Variable Documentation

◆ band_ids

EPR_SPtrArray* band_ids

Contains and array of all band IDs for the product (type EPR_SBandId*)

Definition at line 305 of file epr_api.h.

◆ band_name

char* band_name

The name as presented to the user in a band selection dialog (also known as spectral subset)

Definition at line 636 of file epr_api.h.

◆ bit_mask

epr_uint bit_mask

The bit mask describing this flag

Definition at line 601 of file epr_api.h.

◆ bm_expr

char* bm_expr

A bit-mask expression used to filter valid pixels. All others are set to zero.

Definition at line 707 of file epr_api.h.

◆ buffer

void* buffer

The elements of this raster.
Its volume is raster_width * raster_height * sizeof(data_type) in bytes.

Definition at line 559 of file epr_api.h.

◆ data_type [1/2]

EPR_EDataTypeId data_type

The data type of the band's pixel values.
All corresponding with EPR_DataTypeId types are possible

Definition at line 516 of file epr_api.h.

◆ data_type [2/2]

EPR_EDataTypeId data_type

The data type of the band's pixel values. Possible values are:

  • * --> the datatype remains unchanged.
  • uint8_t --> 8-bit unsigned integer
  • uint32_t --> 32-bit unsigned integer
  • Float --> 32-bit IEEE floating point

Definition at line 669 of file epr_api.h.

◆ dataset_id

EPR_SDatasetId* dataset_id

Definition at line 577 of file epr_api.h.

◆ dataset_ids

EPR_SPtrArray* dataset_ids

Contains and array of all dataset IDs for the product (type EPR_SDatasetId*)

Definition at line 300 of file epr_api.h.

◆ dataset_name

char* dataset_name

The name as presented to the user in a dataset selection dialog

Definition at line 350 of file epr_api.h.

◆ dataset_ref

EPR_SDatasetRef dataset_ref

The reference of the source dataset containing the raw data used to create the band's pixel values. The external format used in the DDDB is MDS-name.field, where field is a one-based index (field=1 corresponds to the first field)

Definition at line 649 of file epr_api.h.

◆ days

int days

Definition at line 741 of file epr_api.h.

◆ description [1/3]

char* description

A short description of the band's contents

Definition at line 366 of file epr_api.h.

◆ description [2/3]

char* description

The flag description.

Definition at line 606 of file epr_api.h.

◆ description [3/3]

char* description

A short description of the band's contents

Definition at line 724 of file epr_api.h.

◆ ds_name

char* ds_name

The dataset name.

Definition at line 391 of file epr_api.h.

◆ ds_offset

epr_uint ds_offset

The offset of dataset-information the product file.

Definition at line 406 of file epr_api.h.

◆ ds_size

epr_uint ds_size

The size of dataset-information in dataset product file.

Definition at line 411 of file epr_api.h.

◆ ds_type

char* ds_type

The dataset type descriptor.

Definition at line 396 of file epr_api.h.

◆ dsd

const EPR_SDSD* dsd

The dataset descriptor obtained from the current product.

Definition at line 345 of file epr_api.h.

◆ dsd_array

EPR_SPtrArray* dsd_array

An array containing all (!) DSDs read from the product's specific product header (SPH).

Definition at line 276 of file epr_api.h.

◆ dsd_name

char* dsd_name

The name as presented to the user in a dsd selection dialog

Definition at line 340 of file epr_api.h.

◆ dsr_size

epr_uint dsr_size

The size of dataset record for the given dataset name.

Definition at line 421 of file epr_api.h.

◆ elem_index

int elem_index

Definition at line 579 of file epr_api.h.

◆ elem_size

epr_uint elem_size

The size in byte of a single element (sample) of this raster's buffer.

Definition at line 521 of file epr_api.h.

◆ elems

void* elems

The elements of this field.

In order to use the data, this member must be casted to one of the following array data types:

  1. unsigned char* - array of unsigned 8-bit integer elements
  2. char* - array of signed 8-bit integer fields
  3. unsigned short* - array of unsigned 16-bit integer elements
  4. short* - array of signed 16-bit integer elements
  5. unsigned int* - array of unsigned 32-bit integer elements
  6. int* - array of signed 32-bit integer elements
  7. float* - array of signed 32-bit floating point elements
  8. double* - array of signed 64-bit floating point elements
  9. EPR_STime* - array of MJD elements

Dedicated access routine are available The element type is given by info->data_type_id and the array length by info->num_elems.

Definition at line 497 of file epr_api.h.

◆ field_index

int field_index

Definition at line 578 of file epr_api.h.

◆ fields

EPR_SField** fields

The record fields. An array of EPR_Field* of length info->num_fields

Definition at line 454 of file epr_api.h.

◆ file_path

char* file_path

The file's path including the file name.

Definition at line 229 of file epr_api.h.

◆ filename

char* filename

The filename in the DDDB with the description of this dataset.

Definition at line 401 of file epr_api.h.

◆ flag_coding

EPR_SPtrArray* flag_coding

The flag coding is a list of EPR_SFlag instances. It determines each of the flags used in this band (= flags dataset). Each flag has a name, a bit-index and a description.

Definition at line 714 of file epr_api.h.

◆ id_string

char id_string[EPR_PRODUCT_ID_STRLEN+1]

The product identifier string obtained from the MPH parameter 'PRODUCT'.

The first 10 characters of this string identify the the product type, e.g. "MER_1P__FR" for a MERIS Level 1b full resolution product. The rest of the string decodes product instance properties.

Definition at line 260 of file epr_api.h.

◆ index

int index

The index of this DSD (zero-based)

Definition at line 386 of file epr_api.h.

◆ info [1/2]

EPR_SRecordInfo* info

The corresponding record info for this record (a 'soft' pointer).

Definition at line 441 of file epr_api.h.

◆ info [2/2]

EPR_SFieldInfo* info

The corresponding field info for this field. supplierCardinality 1

Definition at line 475 of file epr_api.h.

◆ istream

FILE* istream

The input stream as returned by the ANSI C fopen function for the given file path.

Definition at line 235 of file epr_api.h.

◆ lines_mirrored

epr_boolean lines_mirrored

If true (=1) lines will be mirrored (flipped) after read into a raster in order to ensure a pixel ordering in raster X direction from WEST to EAST.

Definition at line 731 of file epr_api.h.

◆ magic [1/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 224 of file epr_api.h.

◆ magic [2/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 330 of file epr_api.h.

◆ magic [3/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 381 of file epr_api.h.

◆ magic [4/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 436 of file epr_api.h.

◆ magic [5/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 469 of file epr_api.h.

◆ magic [6/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 510 of file epr_api.h.

◆ magic [7/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 591 of file epr_api.h.

◆ magic [8/8]

EPR_Magic magic

The magic number for this structure. IMPORTANT: This must always be the first member of this structure.

Definition at line 625 of file epr_api.h.

◆ meris_iodd_version

int meris_iodd_version

For MERIS L1b and RR and FR to provide backward compatibility

Definition at line 310 of file epr_api.h.

◆ microseconds

epr_uint microseconds

Definition at line 743 of file epr_api.h.

◆ mph_record

EPR_SRecord* mph_record

The record representing the main product header (MPH).

Definition at line 265 of file epr_api.h.

◆ name

char* name

The flag name.

Definition at line 596 of file epr_api.h.

◆ num_dsr

epr_uint num_dsr

The number of dataset records for the given dataset name.

Definition at line 416 of file epr_api.h.

◆ num_fields

epr_uint num_fields

The number of fields contained in this record. The value is always equal info->field_infos->length and is provided here for convenience only.

Definition at line 448 of file epr_api.h.

◆ param_table

EPR_SPtrArray* param_table

A table containing dynamic field info parameters. Dynamic field info parameters are created at runtime because the are derived from the product file contents and can not be staically stored in the record info database.

Definition at line 295 of file epr_api.h.

◆ product_id [1/2]

EPR_SProductId* product_id

The ID of the product to which this dataset belongs to.

Definition at line 335 of file epr_api.h.

◆ product_id [2/2]

EPR_SProductId* product_id

The ID of the product to which this band belongs to.

Definition at line 630 of file epr_api.h.

◆ raster_height

epr_uint raster_height

The height of the raster in pixel.
raster_height = (source_height - 1) / source_step_y + 1

Definition at line 553 of file epr_api.h.

◆ raster_width

epr_uint raster_width

The width of the raster in pixel.
raster_width = (source_width - 1) / source_step_x + 1

Definition at line 547 of file epr_api.h.

◆ record_descriptor

const struct RecordDescriptor* record_descriptor

The record descriptor found in the DDDB for this dataset.

Definition at line 355 of file epr_api.h.

◆ record_info

EPR_SRecordInfo* record_info

The record info which describes a record of this dataset.

Definition at line 360 of file epr_api.h.

◆ record_info_cache

EPR_SPtrArray* record_info_cache

Cache for record infos. Contains all record infos read from the database for this file so far.

The reason for caching record infos on a per-file-base is that a some record infos instances can contain file related content such as the number of pixels in a measurecment dataset record (MDSR).

Definition at line 287 of file epr_api.h.

◆ sample_model

EPR_ESampleModel sample_model

The sample model operation applied to the source dataset for getting the correct samples from the MDS (for example MERIS L2). Possible values are:

  • * --> no operation (direct copy)
  • 1OF2 --> first byte of 2-byte interleaved MDS
  • 2OF2 --> second byte of 2-byte interleaved MDS
  • 0123 --> combine 3-bytes interleaved to 4-byte integer

Definition at line 660 of file epr_api.h.

◆ scaling_factor

float scaling_factor

The scaling factor. Possible values are:

  • * --> no factor provided (implies scaling_method=*)
  • const --> a floating point constant
  • GADS.field[.field2] --> value is provided in global annotation dataset with name GADS in field field. Optionally a second element index for multiple-element fields can be given too

Definition at line 702 of file epr_api.h.

◆ scaling_method

EPR_EScalingMethod scaling_method

The scaling method which must be applied to the raw source data in order to get the 'real' pixel values in geo-physical units. Possible values are:

  • * --> no scaling applied
  • Linear_Scale --> linear scaling applied: y = offset + scale * x
  • Log_Scale --> logarithmic scaling applied: y = log10(offset + scale * x)

Definition at line 679 of file epr_api.h.

◆ scaling_offset

float scaling_offset

The scaling offset. Possible values are:

  • * --> no offset provided (implies scaling_method=*)
  • const --> a floating point constant
  • GADS.field[.field2] --> value is provided in global annotation dataset with name GADS in field field. Optionally a second element index for multiple-element fields can be given too

Definition at line 690 of file epr_api.h.

◆ scene_height

epr_uint scene_height

The total height of product's scene raster in pixels.

Definition at line 250 of file epr_api.h.

◆ scene_width

epr_uint scene_width

The total width of product's scene raster in pixels.

Definition at line 245 of file epr_api.h.

◆ seconds

epr_uint seconds

Definition at line 742 of file epr_api.h.

◆ source_height

epr_uint source_height

The height of the source.

Definition at line 531 of file epr_api.h.

◆ source_step_x

epr_uint source_step_x

The sub-sampling for the across-track direction in pixel.

Definition at line 536 of file epr_api.h.

◆ source_step_y

epr_uint source_step_y

The sub-sampling for the along-track direction in pixel.

Definition at line 541 of file epr_api.h.

◆ source_width

epr_uint source_width

The width of the source .

Definition at line 526 of file epr_api.h.

◆ spectr_band_index

int spectr_band_index

The (zero-based) spectral band index. -1 if this is not a spectral band.

Definition at line 641 of file epr_api.h.

◆ sph_record

EPR_SRecord* sph_record

The record representing the specific product header (SPH).

Definition at line 270 of file epr_api.h.

◆ tot_size

epr_uint tot_size

The total size in bytes of the product file.

Definition at line 240 of file epr_api.h.

◆ unit

char* unit

The geophysical unit for the band's pixel values

Definition at line 719 of file epr_api.h.