/** * @see loci.formats.IFormatWriter#saveBytes(int, byte[], int, int, int, int) */ @Override public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { checkParams(no, buf, x, y, w, h); /* if (!isFullPlane(x, y, w, h)) { throw new FormatException( "JPEG2000Writer does not yet support saving image tiles."); } */ //MetadataRetrieve retrieve = getMetadataRetrieve(); //int width = retrieve.getPixelsSizeX(series).getValue().intValue(); //int height = retrieve.getPixelsSizeY(series).getValue().intValue(); out.write(compressBuffer(no, buf, x, y, w, h)); }
throws FormatException, IOException checkParams(no, buf, x, y, w, h); MetadataRetrieve retrieve = getMetadataRetrieve(); boolean littleEndian = false; if (retrieve.getPixelsBigEndian(series) != null) { FormatTools.pixelTypeFromString( retrieve.getPixelsType(series).toString())); int nChannels = getSamplesPerPixel(); options.lossless = compression == null || compression.equals(CompressionType.J2K.getCompression()); options.colorModel = getColorModel();
IFormatWriter writer = new JPEG2000Writer(); writer.setMetadataRetrieve(metadata); writer.setId(file);
throws FormatException, IOException checkParams(no, buf, x, y, w, h); MetadataRetrieve retrieve = getMetadataRetrieve(); boolean littleEndian = false; if (retrieve.getPixelsBigEndian(series) != null) { FormatTools.pixelTypeFromString( retrieve.getPixelsType(series).toString())); int nChannels = getSamplesPerPixel(); options.lossless = compression == null || compression.equals(CompressionType.J2K.getCompression()); options.colorModel = getColorModel();
IFormatWriter writer8 = new JPEG2000Writer(); writer8.setMetadataRetrieve(metadata8); writer8.setId(FILE_8); IFormatWriter writer16 = new JPEG2000Writer(); writer16.setMetadataRetrieve(metadata16); writer16.setId(FILE_16);
/** * @see loci.formats.IFormatWriter#saveBytes(int, byte[], int, int, int, int) */ @Override public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { checkParams(no, buf, x, y, w, h); /* if (!isFullPlane(x, y, w, h)) { throw new FormatException( "JPEG2000Writer does not yet support saving image tiles."); } */ //MetadataRetrieve retrieve = getMetadataRetrieve(); //int width = retrieve.getPixelsSizeX(series).getValue().intValue(); //int height = retrieve.getPixelsSizeY(series).getValue().intValue(); out.write(compressBuffer(no, buf, x, y, w, h)); }
IFormatWriter writer16 = new JPEG2000Writer(); writer16.setMetadataRetrieve(metadata16); writer16.setId(file);