@Override public String getCurrentFile() { return reader.getCurrentFile(); }
@Override public String getCurrentFile() { return reader.getCurrentFile(); }
public Configuration(IFormatReader reader, String configFile) { this.dataFile = reader.getCurrentFile(); this.configFile = configFile; populateINI(reader); }
@Override public String getCurrentFile() { if (currentId == null) return null; return getReader().getCurrentFile(); }
@Override public String getCurrentFile() { if (currentId == null) return null; return getReader().getCurrentFile(); }
/** check if the given reader is set to the given file and series * * @param reader the reader * @param file the file * @param series the series * @return true or false */ public static boolean checkReaderFileAndSeries(final IFormatReader reader, final File file, final int series) { // if we have a fileStitcher, do not check the actual file name final boolean isFileStitcher = FileStitcher.class.isInstance( ( (Memoizer) reader).getReader() ); if (isFileStitcher) if (reader.getCurrentFile() == null) return false; else return reader.getSeries() == series; if (reader.getCurrentFile() == null || !reader.getCurrentFile().equals( file.getAbsolutePath() )) return false; else return reader.getSeries() == series; }
@Override public void reopenFile() throws IOException { super.reopenFile(); for (int s=0; s<info.length; s++) { for (int q=0; q<info[s].length; q++) { // only reopen readers that had previously been initialized if (info[s][q] != null && info[s][q].reader != null && info[s][q].reader.getCurrentFile() != null) { info[s][q].reader.reopenFile(); } } } }
@Override public void reopenFile() throws IOException { super.reopenFile(); for (int s=0; s<info.length; s++) { for (int q=0; q<info[s].length; q++) { // only reopen readers that had previously been initialized if (info[s][q] != null && info[s][q].reader != null && info[s][q].reader.getCurrentFile() != null) { info[s][q].reader.reopenFile(); } } } }
private void putTableName(IniTable table, IFormatReader reader, String suffix) { Location file = new Location(reader.getCurrentFile()); table.put(IniTable.HEADER_KEY, file.getName() + suffix); }
boolean haveToReadFile = false; haveToReadFile |= (reader.getCurrentFile() == null); try { haveToReadFile |= !(new File(reader.getCurrentFile()).getCanonicalPath().equals( file.getCanonicalPath() ) ); } catch (IOException e) { return; }
legacyReader.setId(id); legacyReaderInitialized = true; currentId = legacyReader.getCurrentFile(); nativeReader.setId(id); nativeReaderInitialized = true; currentId = nativeReader.getCurrentFile(); nativeReader.setId(id); nativeReaderInitialized = true; currentId = nativeReader.getCurrentFile(); legacyReader.setId(id); legacyReaderInitialized = true; currentId = legacyReader.getCurrentFile();
@Override public void setId(String id) throws FormatException, IOException { if (isLegacy()) { super.setId(id); } nativeReader.setId(id); nativeReaderInitialized = true; currentId = nativeReader.getCurrentFile(); core = new ArrayList<CoreMetadata>(nativeReader.getCoreMetadataList()); metadata = nativeReader.getGlobalMetadata(); metadataStore = nativeReader.getMetadataStore(); }
/** * Convenience method for checking that the plane number, tile size and * buffer sizes are all valid for the given reader. * If 'bufLength' is less than 0, then the buffer length check is not * performed. */ public static void checkPlaneParameters(IFormatReader r, int no, int bufLength, int x, int y, int w, int h) throws FormatException { assertId(r.getCurrentFile(), true, 2); checkPlaneNumber(r, no); checkTileSize(r, x, y, w, h); if (bufLength >= 0) checkBufferSize(r, bufLength, w, h); }
@Override public void setId(String id) throws FormatException, IOException { if (isLegacy()) { super.setId(id); } nativeReader.setId(id); nativeReaderInitialized = true; currentId = nativeReader.getCurrentFile(); core = new ArrayList<CoreMetadata>(nativeReader.getCoreMetadataList()); metadata = nativeReader.getGlobalMetadata(); metadataStore = nativeReader.getMetadataStore(); }
/** * Convenience method for checking that the plane number, tile size and * buffer sizes are all valid for the given reader. * If 'bufLength' is less than 0, then the buffer length check is not * performed. */ public static void checkPlaneParameters(IFormatReader r, int no, int bufLength, int x, int y, int w, int h) throws FormatException { assertId(r.getCurrentFile(), true, 2); checkPlaneNumber(r, no); checkTileSize(r, x, y, w, h); if (bufLength >= 0) checkBufferSize(r, bufLength, w, h); }
lastReader.getCurrentFile() == null)
lastReader.getCurrentFile() == null)
String filename = store.getReader().getCurrentFile(); filename = new File(filename).getName(); plate.setName(rstring(filename));
if (in == null || !file.equalsIgnoreCase(in.getCurrentFile())) { if (in != null) { try {
@Test(dataProvider = "wrappers") public void testCoreMetadata(IFormatReader reader) { assertNotNull(reader.getCurrentFile()); List<CoreMetadata> coreList = reader.getCoreMetadataList(); assertEquals(coreList.size(), reader.getSeriesCount()); for (int i=0; i<reader.getSeriesCount(); i++) { CoreMetadata core = coreList.get(i); reader.setSeries(i); assertEquals(core.sizeX, reader.getSizeX()); assertEquals(core.sizeY, reader.getSizeY()); assertEquals(core.sizeZ, reader.getSizeZ()); assertEquals(core.sizeC, reader.getSizeC()); assertEquals(core.sizeT, reader.getSizeT()); assertEquals(core.pixelType, reader.getPixelType()); assertEquals(core.imageCount, reader.getImageCount()); assertEquals(core.dimensionOrder, reader.getDimensionOrder()); assertEquals(core.littleEndian, reader.isLittleEndian()); assertEquals(core.rgb, reader.isRGB()); assertEquals(core.interleaved, reader.isInterleaved()); assertEquals(core.indexed, reader.isIndexed()); } } }