/** * Constructor. * This is for HDF5 chunked data storage. The data is read by chunk, for efficency. * * @param vinfo the vinfo object for this variable * @param dtype type of data. may be different from v2. * @param wantSection the wanted section of data, contains a List of Range objects, must be complete * @throws InvalidRangeException if section invalid for this variable * @throws java.io.IOException on io error */ H5tiledLayout(H5header.Vinfo vinfo, DataType dtype, Section wantSection) throws InvalidRangeException, IOException { assert vinfo.isChunked; assert vinfo.btree != null; // we have to translate the want section into the same rank as the storageSize, in order to be able to call // Section.intersect(). It appears that storageSize (actually msl.chunkSize) may have an extra dimension, reletive // to the Variable. if ((dtype == DataType.CHAR) && (wantSection.getRank() < vinfo.storageSize.length)) this.want = new Section(wantSection).appendRange(1); else this.want = wantSection; // one less chunk dimension, except in the case of char int nChunkDims = (dtype == DataType.CHAR) ? vinfo.storageSize.length : vinfo.storageSize.length - 1; this.chunkSize = new int[nChunkDims]; System.arraycopy(vinfo.storageSize, 0, chunkSize, 0, nChunkDims); this.elemSize = vinfo.storageSize[vinfo.storageSize.length - 1]; // last one is always the elements size if (debug) System.out.println(" H5tiledLayout: " + this); // create the data chunk iterator LayoutTiled.DataChunkIterator iter = vinfo.btree.getDataChunkIteratorNoFilter(this.want, nChunkDims); delegate = new LayoutTiled(iter, chunkSize, elemSize, this.want); }
LayoutTiled.DataChunkIterator iter = vinfo.btree.getDataChunkIteratorNoFilter(this.want, nChunkDims); delegate = new LayoutTiled(iter, chunkSize, elemSize, this.want);
LayoutTiled.DataChunkIterator iter = vinfo.btree.getDataChunkIteratorNoFilter(this.want, nChunkDims); delegate = new LayoutTiled(iter, chunkSize, elemSize, this.want);