diff --git a/components/bio-formats/src/loci/formats/in/CellomicsReader.java b/components/bio-formats/src/loci/formats/in/CellomicsReader.java index c251d30..deb98b5 100644 --- a/components/bio-formats/src/loci/formats/in/CellomicsReader.java +++ b/components/bio-formats/src/loci/formats/in/CellomicsReader.java @@ -61,6 +61,13 @@ public class CellomicsReader extends FormatReader { private String[] files; + private static boolean noHiddenFiles = true; + + public static void setNoHiddenFiles(boolean v) + { + noHiddenFiles = v; + } + // -- Constructor -- /** Constructs a new Cellomics reader. */ @@ -137,7 +144,7 @@ public class CellomicsReader extends FormatReader { String plateName = getPlateName(baseFile.getName()); if (plateName != null && isGroupFiles()) { - String[] list = parent.list(true); + String[] list = parent.list(noHiddenFiles); for (String f : list) { if (plateName.equals(getPlateName(f)) && (checkSuffix(f, "c01") || checkSuffix(f, "dib"))) @@ -326,15 +333,15 @@ public class CellomicsReader extends FormatReader { store.setPixelsPhysicalSizeX(new PositiveFloat(width), 0); } else { - LOGGER.warn("Expected positive value for PhysicalSizeX; got {}", - width); + // LOGGER.warn("Expected positive value for PhysicalSizeX; got {}", + // width); } if (height > 0) { store.setPixelsPhysicalSizeY(new PositiveFloat(height), 0); } else { - LOGGER.warn("Expected positive value for PhysicalSizeY; got {}", - height); + // LOGGER.warn("Expected positive value for PhysicalSizeY; got {}", + // height); } } } diff --git a/components/common/src/loci/common/Location.java b/components/common/src/loci/common/Location.java index 5c13302..5ca70e9 100644 --- a/components/common/src/loci/common/Location.java +++ b/components/common/src/loci/common/Location.java @@ -102,11 +102,17 @@ public class Location { public Location(String pathname) { LOGGER.trace("Location({})", pathname); - try { - url = new URL(getMappedId(pathname)); - } - catch (MalformedURLException e) { - LOGGER.trace("Location is not a URL", e); + + if (pathname.contains("://")) { //very quick check to avoid expensive exception throwing in obvious case + try { + url = new URL(getMappedId(pathname)); + } + catch (MalformedURLException e) { + LOGGER.trace("Location is not a URL", e); + isURL = false; + } + } else { + LOGGER.trace("Location is not a URL"); isURL = false; } if (!isURL) file = new File(getMappedId(pathname));