Hi Lisur,
On Jun 26, 2012, at 4:54 AM, Lisur wrote:
> Hi,
> I would like to write a simple filter function which would take input buffer
> of some floating point type and rewrite the buffer with integer type data
> (rounded values).
>
> For example,
> buf = {1.1, 2.3, 4.5}
> will be filtered to
> buf = {1, 2, 4}
>
> Dataset is of type H5T_NATIVE_FLOAT and I would like that to be changed by
> filter to H5T_NATIVE_INT32.
>
> Is that possible, or should dataset be created with type H5T_NATIVE_INT32
> and filled with memcpy-ed floats and then in filter look at them as if they
> were floats?
Will the H5Tconvert() routine work for you?
Quincey
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org