private void cleanup(RawPixelsStore raw, OmeroReader reader, IFormatWriter writer) { try { if (raw != null) { raw.close(); } } catch (Exception e) { log.error("Error closing pix", e); } try { if (reader != null) { reader.close(); } } catch (Exception e) { log.error("Error closing reader", e); } try { if (writer != null) { writer.close(); } } catch (Exception e) { log.error("Error closing writer", e); } } });
channels[i] = i; rawPixelsStore.setPixelsId(pixels.getId(), true); realMinMax = rawPixelsStore.findMinMax(channels);
raw.setPixelsId(pix.getId().getValue(), true); raw.getPlaneSize()); log.info(String.format( "Using big TIFF? %s mSize=%d " +
public byte[] openBytes(int no, byte[] buf, int x1, int y1, int w1, int h1) throws FormatException, IOException { FormatTools.assertId(currentId, true, 1); FormatTools.checkPlaneNumber(this, no); FormatTools.checkBufferSize(this, buf.length); int[] zct = FormatTools.getZCTCoords(this, no); byte[] plane = null; if (raw != null) { plane = raw.getPlane(zct[0], zct[1], zct[2]); } else if (prx != null) { try { plane = prx.getPlane(zct[0], zct[1], zct[2]); } catch (Exception e) { throw new RuntimeException(e); } } else { throw new RuntimeException("Improperly configured"); } int len = getSizeX() * getSizeY() * FormatTools.getBytesPerPixel(getPixelType()); System.arraycopy((byte[]) plane, 0, buf, 0, len); return buf; }