/** * Constructor. * @param path The root of the ROMIO proprietary pixels store. (usually * <code>/OMERO/Pixels</code>). */ @Deprecated public PixelsService(String path, FilePathResolver resolver) { this(path, resolver, new SimpleBackOff(), new ConfiguredTileSizes(), null); }
public SimpleBackOff(TileSizes sizes, long defaultValue, long maxPixels) { this.sizes = sizes; this.count = 10; this.defaultValue = defaultValue; this.maxPixels = maxPixels; try { ServiceFactory sf = new ServiceFactory(); service = sf.getInstance(JAIIIOService.class); warmUpFactor = calculate(); // WARM-UP scalingFactor = calculate(); } catch (Exception e) { log.error("Failed to create simpleBackOff", e); throw new RuntimeException(e); } }
protected long calculate(Pixels pixels) { // only count tiles if pixels report reasonable size values return (pixels.getSizeC() > maxPixels || pixels.getSizeT() > maxPixels || pixels.getSizeX() > maxPixels || pixels.getSizeY() > maxPixels || pixels .getSizeZ() > maxPixels) ? defaultValue : (long) (scalingFactor * countTiles(pixels)); }
/** * Constructor. * @param path The root of the ROMIO proprietary pixels store. (usually * <code>/OMERO/Pixels</code>). */ public PixelsService(String path) { this(path, null, new SimpleBackOff(), new ConfiguredTileSizes(), null); }
public void throwMissingPyramidException(String msg, Pixels pixels) { throw new MissingPyramidException(msg, calculate(pixels), pixels.getId()); }