/** * @return true if reader being used is LeicaReader */ public boolean isLeicaReader() { return iReader.getReader() instanceof LeicaReader; }
@Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { return getReader().openBytes(no, buf, x, y, w, h); }
@Override public String getCurrentFile() { if (currentId == null) return null; return getReader().getCurrentFile(); }
@Override public byte[] openBytes(int no, int x, int y, int w, int h) throws FormatException, IOException { return getReader().openBytes(no, x, y, w, h); }
@Override public byte[] openBytes(int no, byte[] buf) throws FormatException, IOException { return getReader().openBytes(no, buf); }
@Override public int getRequiredDirectories(String[] files) throws FormatException, IOException { return getReader(files[0]).getRequiredDirectories(files); }
@Override public String[] getPossibleDomains(String id) throws FormatException, IOException { return getReader(id).getPossibleDomains(id); }
@Override public byte[] openBytes(int no, int x, int y, int w, int h) throws FormatException, IOException { return getReader().openBytes(no, x, y, w, h); }
@Override public String[] getPossibleDomains(String id) throws FormatException, IOException { return getReader(id).getPossibleDomains(id); }
@Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { return getReader().openBytes(no, buf, x, y, w, h); }
@Override public byte[] openBytes(int no, byte[] buf) throws FormatException, IOException { return getReader().openBytes(no, buf); }
@Override public int getRequiredDirectories(String[] files) throws FormatException, IOException { return getReader(files[0]).getRequiredDirectories(files); }
@Override public void setId(String id) throws FormatException, IOException { IFormatReader currentReader = getReader(id); LOGGER.info("{} initializing {}", currentReader.getClass().getSimpleName(), id); currentReader.setId(id); }
@Override public Object openPlane(int no, int x, int y, int w, int h) throws FormatException, IOException { return getReader().openPlane(no, x, y, w, h); }
@Override public String getCurrentFile() { if (currentId == null) return null; return getReader().getCurrentFile(); }
@Override public Object openPlane(int no, int x, int y, int w, int h) throws FormatException, IOException { return getReader().openPlane(no, x, y, w, h); }
@Override public int getBitsPerPixel() { return getReader().getBitsPerPixel(); }
@Override public boolean isInterleaved() { return getReader().isInterleaved(); }
@Override public String[] getSeriesUsedFiles(boolean noPixels) { return getReader().getSeriesUsedFiles(noPixels); }
@Test(dataProvider = "levels") public void testOptionsImplicit(MetadataLevel level) throws Exception { ImageReader reader = new ImageReader(); reader.getMetadataOptions().setMetadataLevel(level); reader.setId("test.fake"); MetadataLevel rLevel = reader.getReader().getMetadataOptions().getMetadataLevel(); assertEquals(rLevel, level); reader.close(); }