/** * @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); String file = positions.get(getSeries()).getFile( getDimensionOrder(), getSizeZ(), getSizeC(), getSizeT(), getImageCount(), no); if (file != null && new Location(file).exists()) { tiffReader.setId(file); int index = no % tiffReader.getImageCount(); return tiffReader.openBytes(index, buf, x, y, w, h); } LOGGER.warn("File for image #{} ({}) is missing.", no, file); 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); String file = positions.get(getSeries()).getFile( getDimensionOrder(), getSizeZ(), getSizeC(), getSizeT(), getImageCount(), no); if (file != null && new Location(file).exists()) { tiffReader.setId(file); int index = no % tiffReader.getImageCount(); return tiffReader.openBytes(index, buf, x, y, w, h); } LOGGER.warn("File for image #{} ({}) is missing.", no, file); return buf; }
if (r.getImageCount() == 1 && w + x == getSizeX() && h + y == getSizeY()) { r.close();
if (r.getImageCount() == 1 && w + x == getSizeX() && h + y == getSizeY()) { r.close();