Changeset 6217


Ignore:
Timestamp:
05/03/10 12:10:00 (10 years ago)
Author:
melissa
Message:

Reduced Zeiss LSM IFD parsing time.

Location:
trunk/components/bio-formats/src/loci/formats
Files:
1 added
1 edited

Legend:

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

    r6080 r6217  
    331331      s.order(isLittleEndian()); 
    332332      s.seek(0); 
    333       ifdsList.set(i, new TiffParser(s).getNonThumbnailIFDs()); 
     333      // calling tp.getNonThumbnailIFDs() would give us the same IFDList, but 
     334      // assuming that every other IFD is a thumbnail reduces the parsing time 
     335      TiffParser tp = new TiffParser(s); 
     336      long[] ifdOffsets = tp.getIFDOffsets(); 
     337      IFDList ifds = new IFDList(); 
     338      for (int offset=0; offset<ifdOffsets.length; offset+=2) { 
     339        ifds.add(tp.getIFD(ifdOffsets[offset])); 
     340      } 
     341      ifdsList.set(i, ifds); 
    334342      s.close(); 
    335343    } 
Note: See TracChangeset for help on using the changeset viewer.