Page tree

The license could not be verified: License Certificate has expired!

 

JAVA

FORTRAN

C++

C

 

Link

H5LR_GET_REGION_INFO

Retrieves information about the data a region reference points to.

Procedure:

H5LR_GET_REGION_INFO(obj_id, ref, len, path, rank, dtype, sel_type, numelem, buf)

Signature:

herr_t H5LRget_region_info( hid_t obj_id, const hdset_reg_ref_t *ref, size_t *len, char *path, int*rank, hid_t *dtype, H5S_sel_type *sel_type, size_t *numelem, hsize_t *buf )

SUBROUTINE H5LRget_region_info_f(obj_id, ref, error, &               
     length, path, rank, dtype, sel_type, numelem, buf)
   IMPLICIT NONE

  INTEGER(hid_t), INTENT(IN) :: obj_id                              ! Identifier of any object in an HDF5 file the region 
                                                                    !  reference belongs to.
  TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref                        ! Region reference to query
  INTEGER, INTENT(OUT) :: error                                     ! Error code:
                                                                    !  0 on success and -1 on failure
  INTEGER(size_t), INTENT(INOUT), OPTIONAL :: length                ! Size of the buffer to store path in
                                                                    ! NOTE: If path is present then length
                                                                    !       is required and must be large enough to hold path.
                                                                    !       Returns the trimmed length of path
  CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(1:1), OPTIONAL :: path ! Full path that a region reference points to
  INTEGER, INTENT(OUT), OPTIONAL :: rank                            ! The number of dimensions of the dataset dimensions 
                                                                    !  of the dataset pointed by region reference
  INTEGER(hid_t), INTENT(OUT), OPTIONAL :: dtype                    ! Datatype of the dataset pointed by the region reference
  INTEGER, INTENT(OUT), OPTIONAL :: sel_type                        ! Type of the selection (point or hyperslab)
  INTEGER(size_t), INTENT(INOUT), OPTIONAL :: numelem               ! Number of coordinate blocks or selected elements
  INTEGER(hsize_t), DIMENSION(*), OPTIONAL :: buf                   ! Buffer containing description of the region pointed 
                                                                    !  by region reference
END SUBROUTINE H5LRget_region_info_f

Parameters:
hid_t obj_idIN: Identifier of any object in an HDF5 file the region reference belongs to.
const hdset_reg_ref_t *refIN: Region reference to query.
size_t *lenIN/OUT: Size of the buffer to store path in. NOTE: if *path is not NULL then *len must be the appropriate length
char *pathOUT: Full path that a region reference points to.
int *rankOUT: The number of dimensions of the dataset dimensions of the dataset pointed by region reference.
hid_t *dtypeOUT: Datatype of the dataset pointed by the region reference.
H5S_sel_type *sel_typeOUT: Type of the selection (point or hyperslab).
size_t *numelemIN/OUT: Number of coordinate blocks or selected elements.
hsize_t *bufOUT: Buffer containing description of the region pointed by region reference.

Description:

H5LRget_region_info queries information about the data pointed by a region reference ref. It returns one of the absolute paths to a dataset, length of the path, dataset’s rank and datatype, description of the referenced region and type of the referenced region. Any output argument can be NULL if that argument does not need to be returned.

The parameter obj_id is an identifier for any object in the HDF5 file containing the referenced object. For example, it can be an identifier of a dataset the region reference belongs to or an identifier of an HDF5 file the dataset with region references is stored in.

The parameter ref is a region reference to query.

The parameter path is a pointer to application allocated buffer of size len+1 to return an absolute path to a dataset the region reference points to.

The parameter len is a length of absolute path string plus the \0 string terminator. If path parameter is NULL, actual length of the path (+1 for \0 string terminator) is returned to application and can be used to allocate buffer path of an appropriate length len.

The parameter sel_type describes the type of the selected region. Possible values can be H5S_SEL_POINTS for point selection and H5S_SEL_HYPERSLABS for hyperslab selection.

The parameter numelem describes how many elements will be placed in the buffer buf. The number should be interpreted using the value of sel_type.

If value of sel_type is H5S_SEL_HYPERSLABS, the parameter buf contains numelem blocks of the coordinates for each simple hyperslab of the referenced region. Each block has length 2*rank and is organized as follows: <"start" coordinate>, immediately followed by <"opposite" corner coordinate>. The total size of the buffer to hold the description of the region will be 2*rank*numelem. If region reference points to a contiguous sub-array, then the value of numelem is 1 and the block contains coordinates of the upper left and lower right corners of the sub-array (or simple hyperslab).

If value of sel_type is H5S_SEL_POINTS, the parameter buf contains numelem blocks of the coordinates for each selected point of the referenced region. Each block has length rank and contains coordinates of the element. The total size of the buffer to hold the description of the region will be rank*numelem.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

Coming Soon!

History:
Release    Change
1.0C function introduced in this release.
1.1Fortran wrapper introduced in this release.

--- Last Modified: December 04, 2017 | 07:28 AM