Changeset 7316


Ignore:
Timestamp:
12/03/10 13:26:57 (9 years ago)
Author:
melissa
Message:

Return a blank plane if a TIFF file is missing, just like we do with many other formats.

Files:
3 edited

Legend:

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

    r5614 r7316  
    216216    if (filename == null) return buf; 
    217217 
    218     RandomAccessInputStream plane = getFile(filename); 
     218    RandomAccessInputStream plane = null; 
     219    try { 
     220      plane = getFile(filename); 
     221    } 
     222    catch (IOException e) { } 
     223 
     224    if (plane == null) return buf; 
    219225    TiffParser tp = new TiffParser(plane); 
    220226    IFDList ifds = tp.getIFDs(); 
     
    11301136      filename = sanitizeFile(filename, path); 
    11311137 
    1132       RandomAccessInputStream stream = getFile(filename); 
    1133       String data = stream.readString((int) stream.length()); 
    1134       stream.close(); 
     1138      String data = null; 
     1139      try { 
     1140        RandomAccessInputStream stream = getFile(filename); 
     1141        data = stream.readString((int) stream.length()); 
     1142        stream.close(); 
     1143      } 
     1144      catch (IOException e) { 
     1145        continue; 
     1146      } 
    11351147 
    11361148      String[] lines = data.split("\n"); 
  • branches/4.2/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r7279 r7316  
    236236    if (filename == null) return buf; 
    237237 
    238     RandomAccessInputStream plane = getFile(filename); 
     238    RandomAccessInputStream plane = null; 
     239    try { 
     240      plane = getFile(filename); 
     241    } 
     242    catch (IOException e) { } 
     243 
     244    if (plane == null) return buf; 
    239245    TiffParser tp = new TiffParser(plane); 
    240246    IFDList ifds = tp.getIFDs(); 
  • trunk/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r7250 r7316  
    236236    if (filename == null) return buf; 
    237237 
    238     RandomAccessInputStream plane = getFile(filename); 
     238    RandomAccessInputStream plane = null; 
     239    try { 
     240      plane = getFile(filename); 
     241    } 
     242    catch (IOException e) { } 
     243 
     244    if (plane == null) return buf; 
    239245    TiffParser tp = new TiffParser(plane); 
    240246    IFDList ifds = tp.getIFDs(); 
Note: See TracChangeset for help on using the changeset viewer.