Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Sets a data transform expression

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5P_SET_DATA_TRANSFORM ( plist_id, expression )

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">herr_t H5Pset_data_transform
                     (hid_t plist_id,
                     const char *expression)
  </code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">Fortran90 Interface: h5pset_data_transform_f

SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr)
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: plist_id 
                                    ! Identifier of the property list or class
  CHARACTER(LEN=*), INTENT(IN) :: expression  
                                    ! Buffer to hold transform expression
  INTEGER, INTENT(OUT) :: hdferr    ! Error code
                                    ! 0 on success and -1 on failure
END SUBROUTINE h5pset_data_transform_f
    </code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t plist_idIN: Identifier of the property list or class
const char *expression  IN: Pointer to the null-terminated data transform expression

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5P_SET_DATA_TRANSFORM sets the data transform to be used for reading and writing data. This function operates on the dataset transfer property lists plist_id.

The expression parameter is a string containing an algebraic expression, such as (5/9.0)*(x-32) or x*(x-5). When a dataset is read or written with this property list, the transform expression is applied with the x being replaced by the values in the dataset. When reading data, the values in the file are not changed and the transformed data is returned to the user.

Data transforms can only be applied to integer or floating-point datasets. Order of operations is obeyed and the only supported operations are +, -, *, and /. Parentheses can be nested arbitrarily and can be used to change precedence.

When writing data back to the dataset, the transformed data is written to the file and there is no way to recover the original values to which the transform was applied.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Success: a non-negative value

Failure: a negative value

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_dtransform.c
showLineNumberstrue
lineStart115
progLangplain
lineEnd122
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5-examples
branchIdrefs/heads/master
projectKeyHDFFV
filepath1_10/FORTRAN/H5D/h5ex_d_transform.f90
showLineNumberstrue
lineStart65
progLangplain
lineEnd80
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.8.0Function introduced in this release.