Changeset 6104


Ignore:
Timestamp:
04/08/10 11:35:50 (10 years ago)
Author:
melissa
Message:
  • Make sure that DV log files are detected regardless of the MetadataLevel.
  • Fixed IPLab Mac type detection bug.
Location:
trunk/components/bio-formats/src/loci/formats/in
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/DeltavisionReader.java

    r6074 r6104  
    179179 
    180180    super.initFile(id); 
     181    findLogFiles(); 
    181182 
    182183    MetadataLevel metadataLevel = metadataOptions.getMetadataLevel(); 
     
    304305    core[0].indexed = false; 
    305306    core[0].falseColor = false; 
    306      
     307 
    307308    // --- populate original metadata --- 
    308309 
     
    733734  } 
    734735 
    735   /** Extract metadata from associated log file, if it exists. */ 
    736   private boolean parseLogFile(MetadataStore store) throws IOException { 
    737     // see if log file exists 
     736  /** Find the log files. */ 
     737  private void findLogFiles() throws IOException { 
    738738    if (getCurrentFile().endsWith("_D3D.dv")) { 
    739739      logFile = getCurrentFile(); 
     
    741741    } 
    742742    else logFile = getCurrentFile() + ".log"; 
    743     if (!new Location(logFile).exists()) { 
     743    if (!new Location(logFile).exists()) logFile = null; 
     744 
     745    int dot = getCurrentFile().lastIndexOf("."); 
     746    String base = getCurrentFile().substring(0, dot); 
     747    deconvolutionLogFile = base + "_log.txt"; 
     748    if (!new Location(deconvolutionLogFile).exists()) { 
     749      deconvolutionLogFile = null; 
     750    } 
     751  } 
     752 
     753  /** Extract metadata from associated log file, if it exists. */ 
     754  private boolean parseLogFile(MetadataStore store) throws IOException { 
     755    if (logFile == null || !new Location(logFile).exists()) { 
    744756      logFile = null; 
    745757      return false; 
     
    968980  /** Parse deconvolution output, if it exists. */ 
    969981  private void parseDeconvolutionLog(MetadataStore store) throws IOException { 
    970     int dot = getCurrentFile().lastIndexOf("."); 
    971     String base = getCurrentFile().substring(0, dot); 
    972     if (!new Location(base + "_log.txt").exists()) return; 
     982    if (deconvolutionLogFile == null || 
     983      !new Location(deconvolutionLogFile).exists()) 
     984    { 
     985      return; 
     986    } 
    973987 
    974988    LOGGER.info("Parsing deconvolution log file"); 
    975  
    976     deconvolutionLogFile = base + "_log.txt"; 
    977989 
    978990    RandomAccessInputStream s = 
  • trunk/components/bio-formats/src/loci/formats/in/IvisionReader.java

    r6055 r6104  
    8888    try { 
    8989      Double.parseDouble(version); 
    90       return true; 
     90      return version.indexOf(".") != -1; 
    9191    } 
    9292    catch (NumberFormatException e) { } 
Note: See TracChangeset for help on using the changeset viewer.