Changeset 5654


Ignore:
Timestamp:
10/29/09 12:17:49 (10 years ago)
Author:
melissa
Message:

Removed unnecessary method and fixed exception with multi-Image datasets.

File:
1 edited

Legend:

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

    r5564 r5654  
    166166    FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); 
    167167    lastPlane = no; 
    168     IFormatReader r = info[series][no].reader; 
    169     r.setId(info[series][no].id); 
    170     return r.openBytes(info[series][no].ifd, buf, x, y, w, h); 
     168    int i = info[series][no].ifd; 
     169    IFD ifd = ((MinimalTiffReader) info[series][no].reader).getIFDs().get(i); 
     170    RandomAccessInputStream s = 
     171      new RandomAccessInputStream(info[series][no].id); 
     172    TiffParser p = new TiffParser(s); 
     173    p.getSamples(ifd, buf, x, y, w, h); 
     174    s.close(); 
     175    return buf; 
    171176  } 
    172177 
     
    381386          IFormatReader r = readers.get(filename); 
    382387          if (r == null) { 
    383             r = new TiffReader(); 
     388            r = new MinimalTiffReader(); 
    384389            readers.put(filename, r); 
    385390          } 
     
    549554  // -- Helper methods -- 
    550555 
    551   private IFormatReader getReader(int no) throws FormatException, IOException { 
    552     FormatTools.checkPlaneNumber(this, no); 
    553     IFormatReader r = info[series][no].reader; 
    554     r.setId(info[series][no].id); 
    555     return r; 
    556   } 
    557  
    558556  private String normalizeFilename(String dir, String name) { 
    559557     File file = new File(dir, name); 
Note: See TracChangeset for help on using the changeset viewer.