/** * Attempts to enable SLF4J logging and set the root logger level. * * This method will first try to initialize the logging using * {@link #enableLogging()}. If this method returns {@code true}, the root * logger level is also set via {@link #setRootLevel(String)} using the * input level. * * @param level A string indicating the desired level * @return {@code true} if logging was successfully enabled by this method */ public static synchronized boolean enableLogging(String level) { boolean status = enableLogging(); if (status) setRootLevel(level); return status; }
/** * Attempts to enable SLF4J logging and set the root logger level. * * This method will first try to initialize the logging using * {@link #enableLogging()}. If this method returns {@code true}, the root * logger level is also set via {@link #setRootLevel(String)} using the * input level. * * @param level A string indicating the desired level * @return {@code true} if logging was successfully enabled by this method */ public static synchronized boolean enableLogging(String level) { boolean status = enableLogging(); if (status) setRootLevel(level); return status; }
public static void main(String[] args) throws Exception { DebugTools.enableLogging("INFO"); if (!new ImageInfo().testRead(args)) System.exit(1); }
public static void main(String[] args) throws FormatException, IOException { DebugTools.enableLogging("INFO"); ImageConverter converter = new ImageConverter(); if (!converter.testConvert(new ImageWriter(), args)) System.exit(1); System.exit(0); }
/** Executes the plugin. */ @Override public void run(ImageProcessor ip) { DebugTools.enableLogging("INFO"); if (!LibraryChecker.checkJava() || !LibraryChecker.checkImageJ()) return; HashSet<String> missing = new HashSet<String>(); LibraryChecker.checkLibrary(LibraryChecker.Library.BIO_FORMATS, missing); LibraryChecker.checkLibrary(LibraryChecker.Library.OME_JAVA_XML, missing); if (!LibraryChecker.checkMissing(missing)) return; if (exporter != null) exporter.run(); }
/** Executes the plugin. */ @Override public void run(ImageProcessor ip) { DebugTools.enableLogging("INFO"); if (!LibraryChecker.checkJava() || !LibraryChecker.checkImageJ()) return; HashSet<String> missing = new HashSet<String>(); LibraryChecker.checkLibrary(LibraryChecker.Library.BIO_FORMATS, missing); LibraryChecker.checkLibrary(LibraryChecker.Library.OME_JAVA_XML, missing); if (!LibraryChecker.checkMissing(missing)) return; if (exporter != null) exporter.run(); }
/** Executes the plugin. */ @Override public void run(String arg) { DebugTools.enableLogging("INFO"); canceled = false; success = false; if (!LibraryChecker.checkJava() || !LibraryChecker.checkImageJ()) return; HashSet<String> missing = new HashSet<String>(); LibraryChecker.checkLibrary(LibraryChecker.Library.BIO_FORMATS, missing); LibraryChecker.checkLibrary(LibraryChecker.Library.OME_JAVA_XML, missing); LibraryChecker.checkLibrary(LibraryChecker.Library.FORMS, missing); if (!LibraryChecker.checkMissing(missing)) return; new Importer(this).run(arg); }
/** Executes the plugin. */ @Override public void run(String arg) { DebugTools.enableLogging("INFO"); canceled = false; success = false; if (!LibraryChecker.checkJava() || !LibraryChecker.checkImageJ()) return; HashSet<String> missing = new HashSet<String>(); LibraryChecker.checkLibrary(LibraryChecker.Library.BIO_FORMATS, missing); LibraryChecker.checkLibrary(LibraryChecker.Library.OME_JAVA_XML, missing); LibraryChecker.checkLibrary(LibraryChecker.Library.FORMS, missing); if (!LibraryChecker.checkMissing(missing)) return; new Importer(this).run(arg); }
public boolean fakeScreen(String[] args) { DebugTools.enableLogging("INFO"); boolean validArgs = parseArgs(args); if (!validArgs || targetDirectoryPath == null) { printUsage(); return false; } // make sure that we don't end up with just a ".fake" directory if (new Location(targetDirectoryPath).exists()) { Location p = new Location(targetDirectoryPath, "screen.fake"); int index = 1; while (p.exists()) { p = new Location(targetDirectoryPath, "screen" + index + ".fake"); index++; } targetDirectoryPath = p.getAbsolutePath(); } Location directoryRoot; if (!FormatHandler.checkSuffix(targetDirectoryPath, ResourceNamer.FAKE_EXT)) { directoryRoot = new Location(targetDirectoryPath + ResourceNamer.DOT + ResourceNamer.FAKE_EXT); } else { directoryRoot = new Location(targetDirectoryPath); } FakeImage fake = new FakeImage(directoryRoot); fake.generateScreen(plates, plateAcquisitions, rows, columns, fields); return true; }