@Override public void close() throws IOException { if (out != null) writeFooter(); super.close(); }
throws FormatException, IOException checkParams(no, buf, x, y, w, h); if (!isFullPlane(x, y, w, h)) { throw new FormatException( "JavaWriter does not yet support saving image tiles."); MetadataRetrieve meta = getMetadataRetrieve(); String pixelType = meta.getPixelsType(series).toString(); int type = FormatTools.pixelTypeFromString(pixelType); if (!DataTools.containsValue(getPixelTypes(), type)) { throw new FormatException("Unsupported image type '" + pixelType + "'."); writePlane(varName, (byte[]) array, w, h); writePlane(varName, (short[]) array, w, h); writePlane(varName, (int[]) array, w, h); writePlane(varName, (long[]) array, w, h); writePlane(varName, (float[]) array, w, h); writePlane(varName, (double[]) array, w, h);
@Override public void setId(String id) throws FormatException, IOException { super.setId(id); if (out.length() == 0) writeHeader(); }
throws FormatException, IOException checkParams(no, buf, x, y, w, h); if (!isFullPlane(x, y, w, h)) { throw new FormatException( "JavaWriter does not yet support saving image tiles."); MetadataRetrieve meta = getMetadataRetrieve(); String pixelType = meta.getPixelsType(series).toString(); int type = FormatTools.pixelTypeFromString(pixelType); if (!DataTools.containsValue(getPixelTypes(), type)) { throw new FormatException("Unsupported image type '" + pixelType + "'."); writePlane(varName, (byte[]) array, w, h); writePlane(varName, (short[]) array, w, h); writePlane(varName, (int[]) array, w, h); writePlane(varName, (long[]) array, w, h); writePlane(varName, (float[]) array, w, h); writePlane(varName, (double[]) array, w, h);
@Override public void setId(String id) throws FormatException, IOException { super.setId(id); if (out.length() == 0) writeHeader(); }
@Override public void close() throws IOException { if (out != null) writeFooter(); super.close(); }