private FlexFile lookupFile(int fileSeries) { effectiveFieldCount = fieldCount; if (wellCount * plateCount == flexFiles.size()) { effectiveFieldCount = 1; } int[] lengths = new int[] {fieldCount, wellCount, plateCount}; int[] pos = FormatTools.rasterToPosition(lengths, fileSeries); boolean zeroWell = wellCount == 1 && effectiveFieldCount == 1; int row = zeroWell ? 0 : wellNumber[pos[1]][0]; int col = zeroWell ? 0 : wellNumber[pos[1]][1]; return lookupFile(row, col, effectiveFieldCount == 1 ? 0 : pos[0]); }
private FlexFile lookupFile(int fileSeries) { effectiveFieldCount = fieldCount; if (wellCount * plateCount == flexFiles.size()) { effectiveFieldCount = 1; } int[] lengths = new int[] {fieldCount, wellCount, plateCount}; int[] pos = FormatTools.rasterToPosition(lengths, fileSeries); boolean zeroWell = wellCount == 1 && effectiveFieldCount == 1; int row = zeroWell ? 0 : wellNumber[pos[1]][0]; int col = zeroWell ? 0 : wellNumber[pos[1]][1]; return lookupFile(row, col, effectiveFieldCount == 1 ? 0 : pos[0]); }
@Override public String[] getSeriesUsedFiles(boolean noPixels) { FormatTools.assertId(currentId, true, 1); final List<String> files = new ArrayList<String>(); files.addAll(measurementFiles); if (!noPixels) { if (fieldCount > 0 && wellCount > 0 && plateCount > 0) { FlexFile file = lookupFile(getSeries()); if (file != null && file.file != null) { if (reverseFileMapping.containsKey(file.file)) { files.add(reverseFileMapping.get(file.file)); } else { files.add(file.file); } } } } return files.toArray(new String[files.size()]); }
@Override public String[] getSeriesUsedFiles(boolean noPixels) { FormatTools.assertId(currentId, true, 1); final List<String> files = new ArrayList<String>(); files.addAll(measurementFiles); if (!noPixels) { if (fieldCount > 0 && wellCount > 0 && plateCount > 0) { FlexFile file = lookupFile(getSeries()); if (file != null && file.file != null) { if (reverseFileMapping.containsKey(file.file)) { files.add(reverseFileMapping.get(file.file)); } else { files.add(file.file); } } } } return files.toArray(new String[files.size()]); }
@Override public int getOptimalTileWidth() { FormatTools.assertId(currentId, true, 1); FlexFile file = lookupFile(0); IFD ifd = file.ifds.get(0); try { return (int) ifd.getTileWidth(); } catch (FormatException e) { LOGGER.debug("Could not retrieve tile width", e); } return super.getOptimalTileWidth(); }
@Override public int getOptimalTileHeight() { FormatTools.assertId(currentId, true, 1); FlexFile file = lookupFile(0); IFD ifd = file.ifds.get(0); try { return (int) ifd.getTileLength(); } catch (FormatException e) { LOGGER.debug("Could not retrieve tile height", e); } return super.getOptimalTileHeight(); }
@Override public int getOptimalTileWidth() { FormatTools.assertId(currentId, true, 1); FlexFile file = lookupFile(0); IFD ifd = file.ifds.get(0); try { return (int) ifd.getTileWidth(); } catch (FormatException e) { LOGGER.debug("Could not retrieve tile width", e); } return super.getOptimalTileWidth(); }
@Override public int getOptimalTileHeight() { FormatTools.assertId(currentId, true, 1); FlexFile file = lookupFile(0); IFD ifd = file.ifds.get(0); try { return (int) ifd.getTileLength(); } catch (FormatException e) { LOGGER.debug("Could not retrieve tile height", e); } return super.getOptimalTileHeight(); }
FlexFile file = lookupFile(wellRow, wellCol, field < 0 ? 0 : field); if (file == null) return;
FlexFile file = lookupFile(wellRow, wellCol, field < 0 ? 0 : field); if (file == null) return;
FlexFile file = lookupFile(wellRow, wellCol, field); IFD ifd = file.ifds.get(0); int nPlanes = file.ifds.size();
FlexFile file = lookupFile(wellRow, wellCol, field); IFD ifd = file.ifds.get(0); int nPlanes = file.ifds.size();
FlexFile firstFile = lookupFile(0); FlexFile file = lookupFile(getSeries());
FlexFile firstFile = lookupFile(0); FlexFile file = lookupFile(getSeries());