/** * Unwraps nested wrapped readers until the core reader (i.e., not * a {@link ReaderWrapper} or {@link ImageReader}) is found. * * @param id Id to use as a basis when unwrapping any nested * {@link ImageReader}s. If null, the current id is used. */ public IFormatReader unwrap(String id) throws FormatException, IOException { return unwrap(null, id); }
/** * Unwraps nested wrapped readers until the core reader (i.e., not * a {@link ReaderWrapper} or {@link ImageReader}) is found. */ public IFormatReader unwrap() throws FormatException, IOException { return unwrap(null, null); }
/** * Unwraps nested wrapped readers until the core reader (i.e., not * a {@link ReaderWrapper} or {@link ImageReader}) is found. * * @param id Id to use as a basis when unwrapping any nested * {@link ImageReader}s. If null, the current id is used. */ public IFormatReader unwrap(String id) throws FormatException, IOException { return unwrap(null, id); }
/** * Unwraps nested wrapped readers until the core reader (i.e., not * a {@link ReaderWrapper} or {@link ImageReader}) is found. */ public IFormatReader unwrap() throws FormatException, IOException { return unwrap(null, null); }
stopWatch = new Slf4JStopWatch(String.format( "%s.alloc_tile.%s.[%d:%d]", ((ReaderWrapper) reader).unwrap().getClass().getName(), filename, series, image)); reader.openBytes(0, x, y, actualTileWidth, actualTileHeight);
stopWatch = new Slf4JStopWatch(String.format( "%s.prealloc_tile.%s.[%d:%d]", ((ReaderWrapper) reader).unwrap().getClass().getName(), filename, series, image)); reader.openBytes(image, buf, x, y, actualTileWidth,
@Test public void setId() throws Exception { reader = new ImageReader(); reader = new ChannelFiller(reader); reader = new ChannelSeparator(reader); reader = new MinMaxCalculator(reader); if (memMap && reader.isSingleFile(id)) { TestTools.mapFile(id); } StopWatch stopWatch = new Slf4JStopWatch(); reader.setId(id); stopWatch.stop(String.format("%s.setId.%s", ((ReaderWrapper) reader).unwrap().getClass().getName(), filename)); seriesCount = reader.getSeriesCount(); }
@Test(groups = {"all", "fast", "automated"}) public void testConsistentReader() { if (config == null) throw new SkipException("No config tree"); String testName = "testConsistentReader"; if (!initFile()) result(testName, false, "initFile"); String format = config.getReader(); IFormatReader r = reader; if (r instanceof ImageReader) { r = ((ImageReader) r).getReader(); } else if (r instanceof ReaderWrapper) { try { r = ((ReaderWrapper) r).unwrap(); } catch (FormatException e) { } catch (IOException e) { } } String realFormat = TestTools.shortClassName(r); result(testName, realFormat.equals(format), realFormat); }
if (r instanceof ReaderWrapper) r = ((ReaderWrapper) r).unwrap(); if (!(r instanceof OMETiffReader)) { boolean littleEndian = false;
r = ((ReaderWrapper) r).unwrap();