@Parameters({"target"}) @BeforeClass public void setUp(String target) throws Exception { log.info("METADATA VALIDATOR TARGET: " + target); sf = new TestServiceFactory().proxy(); config = new ImportConfig(); // Let the user know at what level we're logging ch.qos.logback.classic.Logger lociLogger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger("loci"); ch.qos.logback.classic.Logger omeLogger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger("ome.formats"); log.info( String.format( "Log levels -- Bio-Formats: %s OMERO.importer: %s", lociLogger.getLevel(), omeLogger.getLevel())); store = new OMEROMetadataStoreClient(); store.initialize(sf); store.setEnumerationProvider(new TestEnumerationProvider()); store.setInstanceProvider(new BlitzInstanceProvider(store.getEnumerationProvider())); minimalStore = new OMEROMetadataStoreClient(); minimalStore.initialize(sf); minimalStore.setEnumerationProvider(new TestEnumerationProvider()); minimalStore.setInstanceProvider( new BlitzInstanceProvider(minimalStore.getEnumerationProvider())); wrapper = new OMEROWrapper(config); wrapper.setMetadataOptions(new DefaultMetadataOptions(MetadataLevel.ALL)); minimalWrapper = new OMEROWrapper(config); minimalWrapper.setMetadataOptions(new DefaultMetadataOptions(MetadataLevel.MINIMUM)); wrapper.setMetadataStore(store); store.setReader(wrapper.getImageReader()); minimalStore.setReader(minimalWrapper.getImageReader()); }
/** opens the file using the {@link FormatReader} instance */ private void open(OMEROWrapper reader, OMEROMetadataStoreClient store, CheckedPath targetFile) throws FormatException, IOException { // reader.close(); This instance is no longer re-used reader.setMetadataStore(store); reader.setMinMaxStore(store); store.setReader(reader.getImageReader()); targetFile.bfSetId(reader); // reset series count if (log.isDebugEnabled()) { log.debug("Image Count: " + reader.getImageCount()); } }