private int[] overwriteDimensions(MetadataRetrieve meta) throws IOException { out.seek(dimensionOffset); int sizeX = meta.getPixelsSizeX(series).getValue().intValue(); int sizeY = meta.getPixelsSizeY(series).getValue().intValue(); int z = meta.getPixelsSizeZ(series).getValue().intValue(); int c = meta.getPixelsSizeC(series).getValue().intValue();
protected int getSizeY() throws FormatException { MetadataRetrieve r = getMetadataRetrieve(); if (r == null) { throw new FormatException("MetadataRetrieve cannot be null"); } PositiveInteger y = null; if (getResolution() == 0) { y = r.getPixelsSizeY(getSeries()); } else if (hasResolutions()) { y = resolutionData.get(getSeries()).get(getResolution() - 1).sizeY; } else { y = ((IPyramidStore) r).getResolutionSizeY(getSeries(), getResolution()); } if (y == null) { throw new FormatException("Size Y must not be null"); } return y.getValue().intValue(); }
protected int getSizeY() throws FormatException { MetadataRetrieve r = getMetadataRetrieve(); if (r == null) { throw new FormatException("MetadataRetrieve cannot be null"); } PositiveInteger y = null; if (getResolution() == 0) { y = r.getPixelsSizeY(getSeries()); } else if (hasResolutions()) { y = resolutionData.get(getSeries()).get(getResolution() - 1).sizeY; } else { y = ((IPyramidStore) r).getResolutionSizeY(getSeries(), getResolution()); } if (y == null) { throw new FormatException("Size Y must not be null"); } return y.getValue().intValue(); }
options.height = r.getPixelsSizeY(series).getValue().intValue(); options.channels = 1; options.interleaved = false;
options.height = r.getPixelsSizeY(series).getValue().intValue(); options.channels = 1; options.interleaved = false;
/** * @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( "APNGWriter does not yet support saving image tiles."); } MetadataRetrieve meta = getMetadataRetrieve(); int width = meta.getPixelsSizeX(series).getValue().intValue(); int height = meta.getPixelsSizeY(series).getValue().intValue(); out.seek(footerPointer); if (!initialized[series][no]) { writeFCTL(width, height); if (numFrames == 0) writePLTE(); initialized[series][no] = true; } writePixels(numFrames == 0 ? "IDAT" : "fdAT", buf, x, y, w, h); numFrames++; writeFooter(); }
int height = meta.getPixelsSizeY(series).getValue().intValue(); String pixelType = meta.getPixelsType(series).toString(); int type = FormatTools.pixelTypeFromString(pixelType);
int height = meta.getPixelsSizeY(series).getValue().intValue(); String pixelType = meta.getPixelsType(series).toString(); int type = FormatTools.pixelTypeFromString(pixelType);
int nY = meta.getPixelsSizeY(series).getValue().intValue(); int nZ = meta.getPixelsSizeZ(series).getValue().intValue(); int nC = meta.getPixelsSizeC(series).getValue().intValue();
int height = r.getPixelsSizeY(series).getValue().intValue(); int nChannels = getSamplesPerPixel(); int planeSize = width * height * nChannels;
/** * @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( "APNGWriter does not yet support saving image tiles."); } MetadataRetrieve meta = getMetadataRetrieve(); int width = meta.getPixelsSizeX(series).getValue().intValue(); int height = meta.getPixelsSizeY(series).getValue().intValue(); out.seek(footerPointer); if (!initialized[series][no]) { writeFCTL(width, height); if (numFrames == 0) writePLTE(); initialized[series][no] = true; } writePixels(numFrames == 0 ? "IDAT" : "fdAT", buf, x, y, w, h); numFrames++; writeFooter(); }
int height = r.getPixelsSizeY(series).getValue().intValue(); int nChannels = getSamplesPerPixel(); int planeSize = width * height * nChannels;
options.height = r.getPixelsSizeY(imageIndex).getValue().intValue(); options.channels = 1; options.interleaved = false;
for (int i=0; i<retrieve.getImageCount(); i++) { int sizeX = retrieve.getPixelsSizeX(i).getValue(); int sizeY = retrieve.getPixelsSizeY(i).getValue(); int sizeZ = retrieve.getPixelsSizeZ(i).getValue(); int sizeC = retrieve.getPixelsSizeC(i).getValue();
for (int i=0; i<retrieve.getImageCount(); i++) { int sizeX = retrieve.getPixelsSizeX(i).getValue(); int sizeY = retrieve.getPixelsSizeY(i).getValue(); int sizeZ = retrieve.getPixelsSizeZ(i).getValue(); int sizeC = retrieve.getPixelsSizeC(i).getValue();
int sizeY = retrieve.getPixelsSizeY(0).getValue(); int sizeZ = retrieve.getPixelsSizeZ(0).getValue(); int sizeC = retrieve.getPixelsSizeC(0).getValue();
int sizeY = retrieve.getPixelsSizeY(0).getValue(); int sizeZ = retrieve.getPixelsSizeZ(0).getValue(); int sizeC = retrieve.getPixelsSizeC(0).getValue();
private void writeHeader() throws IOException { MetadataRetrieve r = getMetadataRetrieve(); int width = r.getPixelsSizeX(series).getValue().intValue(); int height = r.getPixelsSizeY(series).getValue().intValue(); int nChannels = getSamplesPerPixel(); out.writeBytes("%!PS-Adobe-2.0 EPSF-1.2\n"); out.writeBytes("%%Title: " + currentId + "\n"); out.writeBytes("%%Creator: " + FormatTools.CREATOR + "\n"); out.writeBytes("%%Pages: 1\n"); out.writeBytes("%%BoundingBox: 0 0 " + width + " " + height + "\n"); out.writeBytes("%%EndComments\n\n"); out.writeBytes("/ld {load def} bind def\n"); out.writeBytes("/s /stroke ld /f /fill ld /m /moveto ld /l " + "/lineto ld /c /curveto ld /rgb {255 div 3 1 roll 255 div 3 1 " + "roll 255 div 3 1 roll setrgbcolor} def\n"); out.writeBytes("0 0 translate\n"); out.writeBytes(((float) width) + " " + ((float) height) + " scale\n"); out.writeBytes("/picstr 40 string def\n"); out.writeBytes(width + " " + height + " 8 [" + width + " 0 0 " + (-1 * height) + " 0 " + height + "] {currentfile picstr readhexstring pop} "); if (nChannels == 1) { out.writeBytes("image\n"); } else { out.writeBytes("false 3 colorimage\n"); } planeOffset = out.getFilePointer(); }
private void writeHeader() throws IOException { MetadataRetrieve r = getMetadataRetrieve(); int width = r.getPixelsSizeX(series).getValue().intValue(); int height = r.getPixelsSizeY(series).getValue().intValue(); int nChannels = getSamplesPerPixel(); out.writeBytes("%!PS-Adobe-2.0 EPSF-1.2\n"); out.writeBytes("%%Title: " + currentId + "\n"); out.writeBytes("%%Creator: " + FormatTools.CREATOR + "\n"); out.writeBytes("%%Pages: 1\n"); out.writeBytes("%%BoundingBox: 0 0 " + width + " " + height + "\n"); out.writeBytes("%%EndComments\n\n"); out.writeBytes("/ld {load def} bind def\n"); out.writeBytes("/s /stroke ld /f /fill ld /m /moveto ld /l " + "/lineto ld /c /curveto ld /rgb {255 div 3 1 roll 255 div 3 1 " + "roll 255 div 3 1 roll setrgbcolor} def\n"); out.writeBytes("0 0 translate\n"); out.writeBytes(((float) width) + " " + ((float) height) + " scale\n"); out.writeBytes("/picstr 40 string def\n"); out.writeBytes(width + " " + height + " 8 [" + width + " 0 0 " + (-1 * height) + " 0 " + height + "] {currentfile picstr readhexstring pop} "); if (nChannels == 1) { out.writeBytes("image\n"); } else { out.writeBytes("false 3 colorimage\n"); } planeOffset = out.getFilePointer(); }
throw new FormatException("SizeX #" + n + " is null"); if (src.getPixelsSizeY(n) == null) { throw new FormatException("SizeY #" + n + " is null");