Search in sources :

Example 1 with H5Datatype

use of ncsa.hdf.object.h5.H5Datatype in project vcell by virtualcell.

the class VH5Dataset method info.

public static void info(H5ScalarDS ds) throws Exception {
    Datatype dt = ds.getDatatype();
    System.out.println(dt.getFullName());
    System.out.println(dt.getDatatypeDescription());
    int n = dt.toNative();
    Datatype nt = new H5Datatype(n);
    // dt = dt.getBasetype();
    System.out.println(nt.getFullName());
    System.out.println(nt.getDatatypeDescription());
    System.out.println(H5Client.parseMeta(dt));
// ds.init();
// int did = ds.open();
// ds.read();
// 
// int cdt = H5.H5Tcreate(HDF5Constants.H5T_COMPOUND,128);
// int vtype = H5.H5Tvlen_create(cdt);
// int ndims = ds.getRank();
// long dims[] = new long[ndims];
// long maxdims[] = new long[ndims];
// int space = H5.H5Dget_space(did);
// H5.H5Sget_simple_extent_dims(space, dims,maxdims);
// System.out.println(StringUtils.join(dims));
// long bsize = H5.H5Dvlen_get_buf_size_long(did,vtype,space);
// 
// double bdata[][] = new double[2][(int)dims[0]];
// int status = H5.H5Dread(did,vtype,HDF5Constants.H5S_ALL,HDF5Constants.H5S_ALL,HDF5Constants.H5P_DEFAULT,bdata);
// System.out.println(status);
}
Also used : H5Datatype(ncsa.hdf.object.h5.H5Datatype) Datatype(ncsa.hdf.object.Datatype) H5Datatype(ncsa.hdf.object.h5.H5Datatype)

Aggregations

Datatype (ncsa.hdf.object.Datatype)1 H5Datatype (ncsa.hdf.object.h5.H5Datatype)1