Changeset 5128


Ignore:
Timestamp:
05/27/09 20:07:27 (11 years ago)
Author:
melissa
Message:

Instead of throwing an exception when .pty files are not found, print a warning and attempt to continue reading the dataset.

File:
1 edited

Legend:

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

    r5121 r5128  
    718718    thumbId = thumbId.replaceAll("pty", "bmp"); 
    719719    thumbId = sanitizeFile(thumbId, (isOIB || mappedOIF) ? "" : path); 
    720     //if (isOIB) thumbId = thumbId.substring(1); 
    721720 
    722721    status("Reading additional metadata"); 
     
    737736      } 
    738737      else tiffPath = file; 
     738 
     739      Location ptyFile = new Location(file); 
     740      if (!ptyFile.exists()) { 
     741        warn("Could not find .pty file (" + file + "); guessing at the " + 
     742          "corresponding TIFF file."); 
     743        String tiff = file.replaceAll(".pty", ".tif"); 
     744        tiffs.add(ii, tiff); 
     745        continue; 
     746      } 
     747 
    739748      RandomAccessInputStream ptyReader = getFile(file); 
    740749      s = ptyReader.readString((int) ptyReader.length()); 
Note: See TracChangeset for help on using the changeset viewer.