/** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); int[] zct = getZCTCoords(no); int channel = zct[1]; readers[channel].setId(ndpiFiles[channel]); readers[channel].setCoreIndex(getCoreIndex()); int cIndex = (bandUsed[channel] < readers[channel].getSizeC()) ? bandUsed[channel] : 0; int plane = readers[channel].getIndex(zct[0], cIndex, zct[2]); readers[channel].openBytes(plane, buf, x, y, w, h); return buf; }
/** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); int[] zct = getZCTCoords(no); int channel = zct[1]; readers[channel].setId(ndpiFiles[channel]); readers[channel].setCoreIndex(getCoreIndex()); int cIndex = (bandUsed[channel] < readers[channel].getSizeC()) ? bandUsed[channel] : 0; int plane = readers[channel].getIndex(zct[0], cIndex, zct[2]); readers[channel].openBytes(plane, buf, x, y, w, h); return buf; }