#include <stdio.h>
#include <string.h>
#include "mfhdf.h"
Go to the source code of this file.
Classes | |
struct | ATTR |
represents the available informations about an attribute (either a file or a SDS one) More... | |
struct | SDS_INFO |
represents the available informations about one SDS : name, rank, dimensions, and list of attributes More... | |
Functions | |
int32 | open_hdf_file (const char *filename) |
open an hdf file for reading | |
int32 | close_hdf_file (const int32 hdf_id) |
close an opened hdf file | |
int32 | get_file_info (const char *filename, int32 *n_sds, char ***v_sds_name, int32 *n_file_attr, char ***v_file_attr_name) |
retrieve the structure of an HDF file | |
int32 | get_sds_info (const char *filename, const char *sds_name, SDS_INFO *sds_info) |
retrieve informations about an SDS : its name, rank, dimensions, and list of attributes | |
int32 | get_sds_info_by_id (const int32 sd_id, const char *sds_name, SDS_INFO *sds_info) |
retrieve informations about an SDS : its name, rank, dimensions, and list of attributes | |
void | print_sds_info (const SDS_INFO *sds_info) |
print out SDS data type, rank, dimensions and list of attributes | |
int32 | get_file_attr (const char *filename, const char *attr_name, ATTR *attr) |
read a file attribute | |
int32 | get_file_attr_by_id (const int32 sd_id, const char *attr_name, ATTR *attr) |
read a file attribute | |
int32 | get_sds_attr (const char *filename, const char *sds_name, const char *attr_name, ATTR *attr) |
read a sds attribute | |
void | print_attr (const ATTR *attr) |
print out data type, number of values and value of the given attribute structure | |
int32 | get_obj_attr (const int32 obj_id, const char *attr_name, ATTR *attr) |
retrieve an attribute, either an SDS or a file one This function is a low level one. Prefer get_file_attr, or get_sds_attr functions for a high level usage | |
int32 | get_obj_attr_by_index (const int32 obj_id, const int32 i_attr, ATTR *attr) |
retrieve an attribute, either an SDS or a file one This function is a low level one. Prefer get_file_attr, or get_sds_attr functions for a high level usage | |
int32 | read_scaled_sds (const char *filename, const char *sds_name, double **sds_data, int32 *start, int32 *stride, int32 *edges) |
read the data of one dataset and apply the scaling to it | |
int32 | read_scaled_sds_by_id (const int32 sd_id, const char *sds_name, double **sds_data, int32 *start, int32 *stride, int32 *edges) |
read the data of one dataset and apply the scaling to it | |
int32 | read_sds (const char *filename, const char *sds_name, void **sds_data, int32 *start, int32 *stride, int32 *edges) |
read the data of one dataset This method is a wrapper to the HDF "SDreaddata" function ( | |
int32 | read_sds_by_id (const int32 sd_id, const char *sds_name, void **sds_data, int32 *start, int32 *stride, int32 *edges) |
read the data of one dataset using a SD interface identifier This method is a wrapper to the HDF "SDreaddata" function ( | |
int32 | get_sds_calibration (const char *filename, const char *sds_name, float64 *cal, float64 *cal_err, float64 *offset, float64 *offset_err, int32 *data_type) |
read the calibration informations of an sds | |
int32 | get_sds_calibration_by_id (const int32 sd_id, const char *sds_name, float64 *cal, float64 *cal_err, float64 *offset, float64 *offset_err, int32 *data_type) |
read the calibration informations of an sds using a SD interface identifier This method is a wrapper to the HDF "SDgetcal" function ( | |
int16 | get_data_type_size (const int32 data_type) |
return the size in byte(s) of the HDF data type code given as parameter | |
void | print_data_type_description (const int32 data_type) |
display a description of the HDF data type code given as parameter | |
int32 | get_sds_id (const int32 sd_id, const char *sds_name) |
retrieve the identifier of an sds LOW LEVEL FUNCTION INTERNAL USAGE | |
int32 | set_start_stride_edge (const int32 sd_id, const char *sds_name, int32 **start, const int32 *stride, int32 **edges) |
guess the start and the number of values to read in a SDS if they are set to NULL INNER FUNCTION user should not have to use this function | |
int32 | scale_data (const void *unscaled_data, const int32 unscaled_data_type, const int32 nb_data, const double scale_factor, const double offset, double *scaled_data) |
apply a scaling y = scale_factor * ( x + offset ) to an unscaled data buffer | |
void | free_typed_data (void **data, const int32 data_type) |
free the given void buffer with the good type | |
void | free_attr (ATTR *attr) |
properly free the memory used for an attribute | |
void | free_sds_info (SDS_INFO *sds_info) |
properly free the memory used for a sds_info structure | |
void | free_v_string (char ***v_string, const int32 n_string) |
free a vector of strings |
History : v0.0.0 : creation
|
open an hdf file for reading
|
|
close an opened hdf file
|
|
retrieve the structure of an HDF file
|
|
retrieve informations about an SDS : its name, rank, dimensions, and list of attributes
|
|
retrieve informations about an SDS : its name, rank, dimensions, and list of attributes
|
|
print out SDS data type, rank, dimensions and list of attributes
|
|
read a file attribute
|
|
read a file attribute
|
|
read a sds attribute
|
|
print out data type, number of values and value of the given attribute structure
|
|
retrieve an attribute, either an SDS or a file one This function is a low level one. Prefer get_file_attr, or get_sds_attr functions for a high level usage
|
|
retrieve an attribute, either an SDS or a file one This function is a low level one. Prefer get_file_attr, or get_sds_attr functions for a high level usage
|
|
read the data of one dataset and apply the scaling to it
|
|
read the data of one dataset and apply the scaling to it
|
|
read the data of one dataset This method is a wrapper to the HDF "SDreaddata" function (
|
|
read the data of one dataset using a SD interface identifier This method is a wrapper to the HDF "SDreaddata" function (
|
|
read the calibration informations of an sds
|
|
read the calibration informations of an sds using a SD interface identifier This method is a wrapper to the HDF "SDgetcal" function (
|
|
return the size in byte(s) of the HDF data type code given as parameter
|
|
display a description of the HDF data type code given as parameter
|
|
retrieve the identifier of an sds LOW LEVEL FUNCTION INTERNAL USAGE
|
|
guess the start and the number of values to read in a SDS if they are set to NULL INNER FUNCTION user should not have to use this function
|
|
apply a scaling y = scale_factor * ( x + offset ) to an unscaled data buffer
|
|
free the given void buffer with the good type
|
|
properly free the memory used for an attribute
|
|
properly free the memory used for a sds_info structure
|
|
free a vector of strings
|