Page tree

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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

JAVA

FORTRAN

C++

C

 

Link

H5Z_GET_FILTER_INFO

Retrieves information about a filter.

Procedure:

H5Z_GET_FILTER_INFO(filter, filter_config)

Signature:

herr_t H5Zget_filter_info( H5Z_filter_t filter, unsigned int *filter_config )

SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr)

  IMPLICIT NONE
  INTEGER, INTENT(IN)  :: filter        ! Filter, may be one of the
                                        ! following:
                                        !     H5Z_FILTER_DEFLATE_F
                                        !     H5Z_FILTER_SHUFFLE_F
                                        !     H5Z_FILTER_FLETCHER32_F
                                        !     H5Z_FILTER_SZIP_F
  INTEGER, INTENT(OUT) :: config_flags  ! Bit field indicating whether
                                        ! a filter's encoder and/or
                                        ! decoder are available
  INTEGER, INTENT(OUT) :: hdferr        ! Error code

END SUBROUTINE h5zfilter_avail_f

Parameters:
H5Z_filter_t filterIN: Identifier of the filter to query. See the introduction to this section of the reference manual for a list of valid filter identifiers.
unsigned int *filter_config

OUT: A bit field encoding the returned filter information

Description:

H5Zget_filter_info retrieves information about a filter. At present, this means that the function retrieves a filter's configuration flags, indicating whether the filter is configured to decode data, to encode data, neither, or both.

If filter_config is not set to NULL prior to the function call, the returned parameter contains a bit field specifying the available filter configuration. The configuration flag values can then be determined through a series of bitwise AND operations, as described below.

Valid filter configuration flags include the following:

    H5Z_FILTER_CONFIG_ENCODE_ENABLED Encoding is enabled for this filter. 
In Fortran, H5Z_FILTER_ENCODE_ENABLED_F.
 H5Z_FILTER_CONFIG_DECODE_ENABLED    Decoding is enabled for this filter. 
In Fortran, H5Z_FILTER_DECODE_ENABLED_F.
 (These flags are defined for C in the HDF5 Library source code file H5Zpublic.h.)

A bitwise AND of the returned filter_config and a valid filter configuration flag will reveal whether the related configuration option is available. For example, if the value of 
     H5Z_FILTER_CONFIG_ENCODE_ENABLED & filter_config 
is true, i.e., greater than 0 (zero), the queried filter is configured to encode data; if the value is FALSE, i.e., equal to 0 (zero), the filter is not so configured.

If a filter is not encode-enabled, the corresponding H5Pset_* function will return an error if the filter is added to a dataset creation property list (which is required if the filter is to be used to encode that dataset). For example, if the H5Z_FILTER_CONFIG_ENCODE_ENABLED flag is not returned for the SZIP filter, H5Z_FILTER_SZIP, a call to H5Pset_szip will fail.

If a filter is not decode-enabled, the application will not be able to read an existing file encoded with that filter.

This function should be called, and the returned filter_config analyzed, before calling any other function, such as H5Pset_szip, that might require a particular filter configuration.

Returns:

Returns a non-negative value on success, a negative value on failure.

Example:

examples / h5_subset.c [32:42]  1.10/master  HDFFV/hdf5
int
main (void)
{
    hsize_t     dims[2], dimsm[2];   
    int         data[DIM0][DIM1];           /* data to write */
    int         sdata[DIM0_SUB][DIM1_SUB];  /* subset to write */
    int         rdata[DIM0][DIM1];          /* buffer for read */
 
    hid_t       file_id, dataset_id;        /* handles */
    hid_t       dataspace_id, memspace_id; 

     PROGRAM COMPOUNDEXAMPLE

     USE HDF5 ! This module contains all necessary modules

     IMPLICIT NONE

     CHARACTER(LEN=11), PARAMETER :: filename = "compound.h5" ! File name
     CHARACTER(LEN=8), PARAMETER :: dsetname = "Compound"     ! Dataset name
     INTEGER, PARAMETER :: dimsize = 6 ! Size of the dataset

     INTEGER(HID_T) :: file_id       ! File identifier

c++ / examples / create.cpp [33:43]  1.10/master  HDFFV/hdf5
int main (void)
{
   /*
    * Data initialization.
    */
   int i, j;
   int data[NX][NY];          // buffer for data to write
   for (j = 0; j < NX; j++)
   {
      for (i = 0; i < NY; i++)

public class H5Ex_D_Chunk {
    private static String FILENAME = "H5Ex_D_Chunk.h5";
    private static String DATASETNAME = "DS1";
    private static final int DIM_X = 6;
    private static final int DIM_Y = 8;
    private static final int CHUNK_X = 4;
    private static final int CHUNK_Y = 4;
    private static final int RANK = 2;
    private static final int NDIMS = 2;

History:
Release    C
1.6.3Function introduced in this release.
Fortran subroutine introduced in this release.

--- Last Modified: November 15, 2017 | 08:04 AM