@Override public int getImageCount() { return getReader().getImageCount(); }
/** Checks that the given plane number is valid for the given reader. */ public static void checkPlaneNumber(IFormatReader r, int no) throws FormatException { int imageCount = r.getImageCount(); if (no < 0 || no >= imageCount) { throw new FormatException("Invalid image number: " + no + " (series=" + r.getSeries() + ", imageCount=" + imageCount + ")"); } }
/** Checks that the given plane number is valid for the given reader. */ public static void checkPlaneNumber(IFormatReader r, int no) throws FormatException { int imageCount = r.getImageCount(); if (no < 0 || no >= imageCount) { throw new FormatException("Invalid image number: " + no + " (series=" + r.getSeries() + ", imageCount=" + imageCount + ")"); } }
@Override public int getImageCount() { FormatTools.assertId(getCurrentFile(), true, 2); return noStitch ? reader.getImageCount() : core.get(getCoreIndex()).imageCount; }
@Test(dependsOnMethods={"setId"}) @Assumption(methods = "isNotBigImage") public void testOpenBytesPlane() throws Exception { for (int series = 0; series < seriesCount; series++) { assertSeries(series); byte[] plane = new byte[planeSize]; for (int i = 0; i < reader.getImageCount(); i++) { reader.openBytes(i, plane); } } }
@Override public int getImageCount() { FormatTools.assertId(getCurrentFile(), true, 2); return noStitch ? reader.getImageCount() : core.get(getCoreIndex()).imageCount; }
@Override public int getImageCount() { FormatTools.assertId(getCurrentFile(), true, 2); return (reader.isRGB() && !reader.isIndexed()) ? reader.getRGBChannelCount() * reader.getImageCount() : reader.getImageCount(); }
@Override public int getImageCount() { FormatTools.assertId(getCurrentFile(), true, 2); return (reader.isRGB() && !reader.isIndexed()) ? reader.getRGBChannelCount() * reader.getImageCount() : reader.getImageCount(); }
public static int getImagesPerFile(String pattern, IFormatReader r) throws FormatException, IOException { String[] filenames = getFilenames(pattern, r); int totalPlanes = 0; for (int series=0; series<r.getSeriesCount(); series++) { r.setSeries(series); totalPlanes += r.getImageCount(); } return totalPlanes / filenames.length; }
public static int getImagesPerFile(String pattern, IFormatReader r) throws FormatException, IOException { String[] filenames = getFilenames(pattern, r); int totalPlanes = 0; for (int series=0; series<r.getSeriesCount(); series++) { r.setSeries(series); totalPlanes += r.getImageCount(); } return totalPlanes / filenames.length; }
@Override public int getImageCount() { FormatTools.assertId(getCurrentFile(), true, 2); int no = reader.getImageCount(); if (canMerge()) no /= getSizeC(); return no; }
@Override public int getImageCount() { FormatTools.assertId(getCurrentFile(), true, 2); int no = reader.getImageCount(); if (canMerge()) no /= getSizeC(); return no; }
/** * Gets the Z, C and T coordinates corresponding * to the given rasterized index value (real sizes). */ public static int[] getZCTCoords(IFormatReader reader, int index) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int num = reader.getImageCount(); return getZCTCoords(order, zSize, cSize, tSize, num, index); }
@Override public Object openPlane(int no, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); IFormatReader r = getReader(no); int ino = getAdjustedIndex(no); if (ino < r.getImageCount()) return r.openPlane(ino, x, y, w, h); return null; }
/** * Gets the rasterized index corresponding * to the given Z, C and T coordinates (real sizes). */ public static int getIndex(IFormatReader reader, int z, int c, int t) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int num = reader.getImageCount(); return getIndex(order, zSize, cSize, tSize, num, z, c, t); }
/** * Gets the rasterized index corresponding * to the given Z, C and T coordinates (real sizes). */ public static int getIndex(IFormatReader reader, int z, int c, int t) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int num = reader.getImageCount(); return getIndex(order, zSize, cSize, tSize, num, z, c, t); }
@Override public Object openPlane(int no, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); IFormatReader r = getReader(no); int ino = getAdjustedIndex(no); if (ino < r.getImageCount()) return r.openPlane(ino, x, y, w, h); return null; }
/** * Gets the Z, C and T coordinates corresponding * to the given rasterized index value (real sizes). */ public static int[] getZCTCoords(IFormatReader reader, int index) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int num = reader.getImageCount(); return getZCTCoords(order, zSize, cSize, tSize, num, index); }
@Override public byte[] openThumbBytes(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); IFormatReader r = getReader(no); int ino = getAdjustedIndex(no); if (ino < r.getImageCount()) return r.openThumbBytes(ino); // return a blank image to cover for the fact that // this file does not contain enough image planes return externals[getExternalSeries()].getBlankThumbBytes(); }
@Override public byte[] openThumbBytes(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); IFormatReader r = getReader(no); int ino = getAdjustedIndex(no); if (ino < r.getImageCount()) return r.openThumbBytes(ino); // return a blank image to cover for the fact that // this file does not contain enough image planes return externals[getExternalSeries()].getBlankThumbBytes(); }